/[projects]/smsdaemon/Util.cpp
ViewVC logotype

Diff of /smsdaemon/Util.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 59 by torben, Wed Jun 11 19:42:24 2008 UTC revision 78 by torben, Sat Jun 14 08:39:40 2008 UTC
# Line 53  namespace Util Line 53  namespace Util
53                  return str;                  return str;
54          }          }
55    
56                    bool my_isspace(char ch)
57            {
58                    return (isspace(ch) || ch == 0);
59            }
60    
61          string str_trim(string str)          string str_trim(string str)
62          {          {
63                  while (str.length() > 0 && isspace(str.at(0)))                  while (str.length() > 0 && my_isspace(str.at(0)))
64                          str.erase(0,1);                          str.erase(0,1);
65                  while (str.length() > 0 && isspace(str.at(str.length()-1)))                  while (str.length() > 0 && my_isspace(str.at(str.length()-1)))
66                          str.erase(str.length()-1,1);                          str.erase(str.length()-1,1);
67                  return str;                  return str;
68          }          }

Legend:
Removed from v.59  
changed lines
  Added in v.78

  ViewVC Help
Powered by ViewVC 1.1.20