00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef COMMON_UTILS_H
00015 #define COMMON_UTILS_H
00016
00017 #include <sstream>
00018
00019 #include <string>
00020 #include <vector>
00021 using std::vector;
00022 using std::string;
00023
00029 namespace ASSA {
00030 namespace Utils {
00031
00040 void split (const char* text_, std::vector<std::string>& vec_);
00041
00052 int split_pair (const string& text_, char sep_, string& lhs_, string& rhs_);
00053
00062 int ltrim (std::string& text_, const std::string& delim_);
00063
00073 int rtrim (std::string& text_, const std::string& delim_);
00074
00081 void trim_sides (std::string& text_);
00082
00091 void find_and_replace_char (std::string& text_, char src_, char dest_);
00092
00101 std::string strenv (const char* in_);
00102
00109 std::string get_cwd_name ();
00110
00111
00112 }
00113 }
00114
00115 #endif