Added Util::stringToLower

This commit is contained in:
Ramoe 2017-11-17 11:31:49 +01:00 committed by Thulinma
parent 3e9b7b3615
commit ece9d2b980
2 changed files with 10 additions and 0 deletions

View file

@ -137,6 +137,14 @@ namespace Util{
return result.size() == positions.size(); return result.size() == positions.size();
} }
void stringToLower(std::string & val){
int i = 0;
while(val[i]){
val.at(i) = tolower(val.at(i));
i++;
}
}
/// 64-bits version of ftell /// 64-bits version of ftell
uint64_t ftell(FILE *stream){ uint64_t ftell(FILE *stream){
/// \TODO Windows implementation (e.g. _ftelli64 ?) /// \TODO Windows implementation (e.g. _ftelli64 ?)

View file

@ -9,6 +9,8 @@ namespace Util{
bool createPath(const std::string &path); bool createPath(const std::string &path);
bool stringScan(const std::string &src, const std::string &pattern, bool stringScan(const std::string &src, const std::string &pattern,
std::deque<std::string> &result); std::deque<std::string> &result);
void stringToLower(std::string &val);
uint64_t ftell(FILE *stream); uint64_t ftell(FILE *stream);
uint64_t fseek(FILE *stream, uint64_t offset, int whence); uint64_t fseek(FILE *stream, uint64_t offset, int whence);