My background is computer science and im trying to properly document some of my code.
I have a list of strings and I want to mathematically denote a check if the string is empty. The string exists, it might just be empty. Here $S$ is my string and $l$ my list.
I dont think i can denote it as if $ S \notin \emptyset$ then because an empty string is still a string? quoting wiki empty string
The empty string should not be confused with the empty language ∅, which is a formal language (i.e. a set of strings) that contains no strings, not even the empty string
Or is it as simple as if $|S| = 0$ then
The wiki also mentions the empty string is denoted with ε or sometimes Λ or λ. I assume that if $S = \epsilon$ then is not correct.
if (myString.isEmpty())or in JavaScript,if (myString === "")– JMoravitz Mar 27 '20 at 11:55if myString is emptyseems perfectly acceptable, readable, and non-ambiguous to me – JMoravitz Mar 27 '20 at 12:04