News for hackers. Stuff that matters.
Re:Falsehoods programmers believe about email by heurisko on Thursday September 01, 2022 @04:32AM (#32673625)
> string-compare-case-insensitive(x, y) => true // Right way

what is inside that function?

Re:Falsehoods programmers believe about email by amenghra on Thursday September 01, 2022 @04:56AM (#32673803)

    func string-compare-case-insensitive(x, y) {
      return lower(x) == lower(y) ? lower(x) == lower(y) : lower(x) == lower(y);
    }
/s

More seriously, if you want to learn about this, one place is to look at OpenJDK's sources. E.g. here:

https://github.com/openjdk/jdk/blob/master/src/java.base/sha...

which calls: https://github.com/openjdk/jdk/blob/17283cfe4c697e2118f19992... and https://github.com/openjdk/jdk/blob/17283cfe4c697e2118f19992...

Re:Falsehoods programmers believe about email by jph on Thursday September 01, 2022 @09:42AM (#32676102)
What's inside that function is Unicode case folding and non-deterministic collation, such as ICU, or its equivalent. See https://icu.unicode.org