--- smsdaemon/util.cpp 2008/06/10 20:25:15 38 +++ smsdaemon/util.cpp 2008/06/11 19:42:24 59 @@ -7,7 +7,7 @@ #include #include #include - +#include #include #include "util.h" @@ -42,6 +42,17 @@ return str; } + std::string str_replace_char(std::string str, char search, char replace) + { + unsigned int pos = 0; + + while ( (pos = str.find(search,pos)) != string::npos) + { + str.replace(pos, 1, 1, replace); + } + return str; + } + string str_trim(string str) @@ -90,6 +101,34 @@ return retval; } + + string str_toupper(string str) + { + for (unsigned i=0; i