How do I lowercase std::string?
Is there any other way besides my sauce? This looks so messy
char upperToLower(char in){
if(in<='Z' && in>='A')
return in-('Z'-'z');
return in;
}
...
std::transform(data.begin(), data.end(), data.begin(), ::upperToLower);
Write the toolower() provided by c++
#include <algorithm>
#include <string>
std::string data = "HELLO C WORLD";
std::transform(data.begin(), data.end(), data.begin(), ::tolower);
You can use it with .
581 PHP ssh2_scp_send fails to send files as intended
618 Uncaught (inpromise) Error on Electron: An object could not be cloned
916 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
573 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
© 2024 OneMinuteCode. All rights reserved.