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

Diff of /smsdaemon/Util.h

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

revision 38 by torben, Tue Jun 10 20:25:15 2008 UTC revision 43 by torben, Wed Jun 11 06:46:14 2008 UTC
# Line 4  Line 4 
4    
5  #include <string>  #include <string>
6  #include <vector>  #include <vector>
 #include <cctype>  
7    
8  struct timeval;  struct timeval;
9    
# Line 17  namespace Util Line 16  namespace Util
16          std::string str_striptags(std::string str);          std::string str_striptags(std::string str);
17          std::string str_trim(std::string str);          std::string str_trim(std::string str);
18    
19            std::string str_toupper(std::string str);
20            std::string str_tolower(std::string str);
21    
22            std::string str_replace_char(std::string str, char search, char replace);
23          std::string str_characters(std::string str);          std::string str_characters(std::string str);
24    
25            std::string str_gsm2latin(std::string str);
26            std::string str_latin2gsm(std::string str);
27    
28          std::string readUrl(std::string url, std::string tempfile);          std::string readUrl(std::string url, std::string tempfile);
29    
30          std::string convertToUnicode(std::string);          std::string convertToUnicode(std::string);
31            std::string convertFromUnicode(std::string);
32    
33          int uTimeDiff(const timeval& then, const timeval& now);          int uTimeDiff(const timeval& then, const timeval& now);
34          int mTimeDiff(const timeval& then, const timeval& now);          int mTimeDiff(const timeval& then, const timeval& now);
# Line 32  namespace Util Line 39  namespace Util
39                  usleep(1000);                  usleep(1000);
40          }          }
41    
         inline std::string str_tolower(std::string str)  
         {  
             for(unsigned int i=0; i<str.size();++i)  
                 str[i] = tolower(str[i]);  
             return str;  
         }  
   
42  }  }
43    
44    

Legend:
Removed from v.38  
changed lines
  Added in v.43

  ViewVC Help
Powered by ViewVC 1.1.20