Optimize toasts

This commit is contained in:
momo5502
2016-06-28 19:38:14 +02:00
parent 8a4c64c2db
commit fdda6244d3
5 changed files with 37 additions and 33 deletions

View File

@ -39,6 +39,12 @@ namespace Utils
return input;
}
std::string StrToUpper(std::string input)
{
std::transform(input.begin(), input.end(), input.begin(), ::toupper);
return input;
}
bool EndsWith(std::string haystack, std::string needle)
{
return (strstr(haystack.data(), needle.data()) == (haystack.data() + haystack.size() - needle.size()));

View File

@ -5,6 +5,7 @@ namespace Utils
std::string GetMimeType(std::string url);
const char *VA(const char *fmt, ...);
std::string StrToLower(std::string input);
std::string StrToUpper(std::string input);
bool EndsWith(std::string haystack, std::string needle);
std::vector<std::string> Explode(const std::string& str, char delim);
void Replace(std::string &string, std::string find, std::string replace);