Compare string with German umlauts
Martin Tschierschke
mt at smartdolphin.de
Mon May 18 13:44:15 UTC 2020
Hi,
I have to find a certain line in a file, with a text containing
umlauts.
How do you do this?
The following was not working:
foreach(i,line; file){
if(line=="My text with ö oe, ä ae or ü"){
writeln("found it at line",i)
}
}
I ended up using line.canFind("with part of the text without
umlaut").
It solved the problem, but what is the right way to use umlauts
(encode them) inside the program?
More information about the Digitalmars-d-learn
mailing list