[] CONTAINS [] Block!

Yes. What it wouldn't fix would be if a special capital letter had a two-letter equivalent, because the first toUpper call would just return its input unchanged.

But then the toLower call would give the two letters, instead of a single character.

Yes, getting to two letters is the goal, because you're never going to convert either "ss" or "SS" to an esszedt.

What I meant was this: (and I'm going to use the esszedt as an example)

toUpper(ß) = SS
toUpper(toLower(SS)) = SS
thus:
toUpper(toLower(toUpper(ß))) = toUpper(ß)

If you use toUpper instead of toLower and vise versa, on a

the two outer calls are redundant.

The point is to have a single algorithm that works for capital and for lower case letters. Yes, for lower case diphthongs you can just say tolower(toupper(...)), and for upper case diphthongs you can just say toupper(tolower(...)), but tolower(toupper(tolower(...))) works for both cases (pun unintentional but I don't feel guilty).

Wait, doesn't toLower on a lowercase anything do nothing? And same with toUpper on uppercase? If it did, we wouldn't even need any of this.

Yes. That's why we have to actually change the case of the character, and then (if it started as lower case) convert it back to lower case. Remember, the object of the exercise is that "Straße" be considered the same word as "strasse."

You said

----^^^^^^^^^^-----------------------^^^^^^

I don't understand what you're saying.

"for lower case ... toLower(toUpper( ..."
It should be toUpper(toLower(...))

Oh. Yeah. I have no idea what I'm doing.