3 ms·
> 1) Function names are misleading or not descriptive enough. E.g. isAlpha(). I assumed this meant is alphanumeric, but it actually means isAlphabetic Why shou
by TazeTSchnitzel 10y ago
> 1) Function names are misleading or not descriptive enough. E.g. isAlpha(). I assumed this meant is alphanumeric, but it actually means isAlphabetic
Why should it mean alphanumeric? C's isalpha() also tests for being a letter, for instance, and has isalnum() for alphanumericness.
> If it's not uppercased of course its lowercased
If you're working exclusively with ASCII and ignoring non-letter characters, yes. But is this library bound by those constraints?
- setr 10y agowhat non-letter character should succeed in both isLowercase and isUppercase?
- TazeTSchnitzel 10y agoNone. But letters can be neither lowercase nor uppercase.
- setr 10y agoIn which case, the function(s) should really be throwing some kind of error, since they can't reasonably be applied to the input. But checking !(isUppercase(str) || isLowercase(str)) to see if its not case-able(?) is absurd Obviously you'd instead want the function notCaseable(str).