zlacker

[parent] [thread] 3 comments
1. kazina+(OP)[view] [source] 2025-12-05 23:04:49
Decomposing things just to have different equality notions doesn't generalize.

How would you decompose a character string so that you could have a case-insensitive versus sensitive comparison?

:)

replies(2): >>Neverm+0y >>stouse+CG1
2. Neverm+0y[view] [source] 2025-12-06 04:27:25
>>kazina+(OP)
> How would you decompose a character string

With a capitalization bit mask of course!

And you can speed up full equality comparisons with a quick cap equality check first.

(That is the how. The when is probably "never". :)

replies(1): >>Rygian+3A
◧◩
3. Rygian+3A[view] [source] [discussion] 2025-12-06 04:49:56
>>Neverm+0y
Don't forget to store the locale used for capitalization, too.
4. stouse+CG1[view] [source] 2025-12-06 17:35:47
>>kazina+(OP)
Right, I did note that this decomposition isn’t always applicable. But it often is, and you should default to that when possible.
[go to top]