Re:A popular but wrong way to convert a string to uppercase ...
by NBJack on Wednesday October 09, 2024 @12:33AM
(#41784524)
Word censoring? Ease of use? Console commands (i.e. from Quake to minecraft)?
[ Parent
| on HN ]
Re:A popular but wrong way to convert a string to uppercase ...
by lmm on Wednesday October 09, 2024 @02:44AM
(#41785163)
> Word censoring?
Should only ever be needed for text from the user, and in that case, as GP said, find a way to examine it as-is, don't "convert".
> Ease of use?
What ease of use? When has futzing around with case ever made anything easier?
> Console commands (i.e. from Quake to minecraft)?
Why would those necessitate changing case?
Re:A popular but wrong way to convert a string to uppercase ...
by wongarsu on Wednesday October 09, 2024 @12:49AM
(#41784604)
Those sound exactly like the newcomer detectors GP was referring to. What you want is a case-insensitive string comparison, and outside ASCII that's not equivalent to just turning both strings to lowercase and checking equality (or doing a substring search or whatever the task requires)