--- smsdaemon/util.cpp 2008/06/13 21:15:00 77 +++ smsdaemon/util.cpp 2008/06/14 08:39:40 78 @@ -53,13 +53,16 @@ return str; } - + bool my_isspace(char ch) + { + return (isspace(ch) || ch == 0); + } string str_trim(string str) { - while (str.length() > 0 && isspace(str.at(0))) + while (str.length() > 0 && my_isspace(str.at(0))) str.erase(0,1); - while (str.length() > 0 && isspace(str.at(str.length()-1))) + while (str.length() > 0 && my_isspace(str.at(str.length()-1))) str.erase(str.length()-1,1); return str; }