On Sunday, 13 April 2025 at 17:28:12 UTC, Salih Dincer wrote:
Hi,
Please watch: https://youtu.be/siw602gzPaU
If he had learned this method like me, he would not have needed
if's and long explanations. :)
It's a very redundant thing (ASCII magic) that also weeds out
the incompatible character set. This approach adopts the
toggle/flip method through XOR rather than toLower/toUpper:
This is clever, but you are still missing something important.
Take a look at this example:
string test = "I love dlang!";
test.toggleCase().writeln(); // "iLOVEDLANG" - wrong!