00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef _STRINGUTILS_H
00022 #define _STRINGUTILS_H
00023
00024 #include <string>
00025 #include <vector>
00026 using std::string;
00027 using std::vector;
00028
00029 class StringUtils
00030 {
00031 public:
00032 static string replaceAll ( string haystack, string needle, string s );
00033 static string stripWhite ( string s );
00034 static bool begins ( string source, string sub );
00035 static bool ends ( string source, string sub );
00036 static string itos ( int num );
00037 static string ltos ( long num );
00038 static int split( const string &input, const string &delimiter, vector< string > &items, const bool clean = true );
00039 static string join( vector< string >&items, const string &delimiter );
00040 };
00041
00042 #endif
00043