I have created my custom function to turn a wstring into lower case. However, it is pretty slow in DebugMode. Yes, I know ReleaseMode is what counts, but anyway it is pretty unnerving.
wstring wstringToLower(wstring u) { wstring s; for (int i=0;i<u.size();i++) { wstring sChar; sChar=u.substr(i,1); int iChar=static_cast<int>(sChar[0]); int iNewChar=charCodeToLower(iChar); wstring sNewChar=wstring(1,iNewChar); s.append(sNewChar); } return s; } Does anybody see anything obvious that I could improve to speed up the code, even in DebugMode?
Thank you!
tolowerfor each character?