Re:It's Not Wrong that " ".length == 7
by int_19h on Friday August 22, 2025 @07:07PM
(#44991026)
If you restrict the input to ASCII, then it makes sense to talk about "string length" in this manner. But we're not talking about Unicode strings at all then.
If you do allow Unicode characters in whatever it is you're validating, then your approach is almost certainly wrong for some valid input.
If you do allow Unicode characters in whatever it is you're validating, then your approach is almost certainly wrong for some valid input.