mirror of
https://github.com/eosswedenorg/antelope-keygen
synced 2026-07-03 11:53:41 +02:00
src/utils: make strtolower return the string.
This commit is contained in:
parent
97b5f19930
commit
a2a964b24c
2 changed files with 3 additions and 2 deletions
|
|
@ -39,8 +39,9 @@ std::vector<std::string> strsplit(const std::string& str, const std::string& del
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
void strtolower(std::string& str) {
|
std::string& strtolower(std::string& str) {
|
||||||
std::transform(str.begin(), str.end(), str.begin(), [](unsigned char c){ return std::tolower(c); });
|
std::transform(str.begin(), str.end(), str.begin(), [](unsigned char c){ return std::tolower(c); });
|
||||||
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string& ltrim(std::string& str) {
|
std::string& ltrim(std::string& str) {
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
std::vector<std::string> strsplit(const std::string& str, const std::string& delim);
|
std::vector<std::string> strsplit(const std::string& str, const std::string& delim);
|
||||||
|
|
||||||
void strtolower(std::string& str);
|
std::string& strtolower(std::string& str);
|
||||||
|
|
||||||
std::string& rtrim(std::string& str);
|
std::string& rtrim(std::string& str);
|
||||||
std::string& ltrim(std::string& str);
|
std::string& ltrim(std::string& str);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue