diff options
author | Oleg Morozenkov <reo7sp@users.noreply.github.com> | 2017-03-21 18:50:45 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-21 18:50:45 +0300 |
commit | 4d9e96d9c91e1faeefb67de2164c026f84be020e (patch) | |
tree | 60af55841a59d7af13bb492d248e0744478e8056 /src/tools/StringTools.cpp | |
parent | 1c7d4c17062644d28f485b0ff6cbc213e975ac29 (diff) | |
parent | 156c087f3eeeeffb949ae6a572dd7b52815eb0e5 (diff) |
Merge pull request #43 from kukin-konstantin/master
fix errors and new function
Diffstat (limited to 'src/tools/StringTools.cpp')
-rw-r--r-- | src/tools/StringTools.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/tools/StringTools.cpp b/src/tools/StringTools.cpp index ab7da46..0e68dcc 100644 --- a/src/tools/StringTools.cpp +++ b/src/tools/StringTools.cpp @@ -90,12 +90,10 @@ string generateRandomString(size_t length) { string urlEncode(const string& value, const std::string& additionalLegitChars) { static const string legitPunctuation = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_.-~:"; std::stringstream ss; - std::string t; for (auto const &c : value) { if ((legitPunctuation.find(c) == std::string::npos) && (additionalLegitChars.find(c)==std::string::npos)) { ss << '%' << std::uppercase << std::setfill('0') << std::setw(2) << std::hex << (unsigned int)(unsigned char)c; - t = ss.str(); } else { ss << c; } |