in reply to String comparison "\x00" vs. "".
Is this somehow configuration dependent(like encoding or something) and only happens on my system?
No. It is the way it is.
There are some exceptions to 1 above. If the character contained is numerically zero, then despite having length, the string will conditionally test as false. This is the compromise of "typeless languages" that makes everything work.
And then there are (the celebrated) exceptions to the exception, like "0e0" (& "0e-0" & ... ) that the 'type safety' people hate, but that help make the world go around.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: String comparison "\x00" vs. "".
by herveus (Prior) on Jun 08, 2010 at 11:13 UTC | |
|
Re^2: String comparison "\x00" vs. "".
by JavaFan (Canon) on Jun 08, 2010 at 11:19 UTC | |
by ikegami (Patriarch) on Jun 08, 2010 at 15:41 UTC | |
by JavaFan (Canon) on Jun 08, 2010 at 16:07 UTC | |
by BrowserUk (Patriarch) on Jun 08, 2010 at 11:39 UTC |