00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef TALOS_FILE_STRING_HXX
00022
00023
00024 namespace Talos
00025 {
00026
00027 template<typename T>
00028 string to_str(const T& input);
00029
00030 string fill(const string& input, int l = 2, char c = ' ',
00031 ostringstream::fmtflags flags = ostringstream::left);
00032
00033 template<typename T>
00034 string to_str_fill(const T& input, int l = 2, char c = ' ',
00035 ostringstream::fmtflags flags = ostringstream::left);
00036
00037 template <class T>
00038 void to_num(const string& s, T& num);
00039
00040 template <class T>
00041 T to_num(const string& s);
00042
00043 template <class T>
00044 void convert(const string& s, T& num);
00045 void convert(const string& s, string& num);
00046
00047 template <class T>
00048 T convert(const string& s);
00049
00050 string lower_case(string str);
00051 string upper_case(string str);
00052
00053 bool is_num(const string& s);
00054
00055 bool is_integer(const string& s);
00056
00057 bool is_unsigned_integer(const string& s);
00058
00059 string find_replace(string str, string old_str, string new_str = "");
00060
00061 string trim(string str, string delimiters = " \n\t");
00062
00063 string trim_beg(string str, string delimiters = " \n\t");
00064
00065 string trim_end(string str, string delimiters = " \n\t");
00066
00067 template <class T>
00068 void split(string str, vector<T>& vect, string delimiters = " \n\t");
00069 vector<string> split(string str, string delimiters = " \n\t");
00070
00071 template <class T>
00072 void split_markup(string str, vector<T>& elements, vector<bool>& is_markup,
00073 string delimiters = "$");
00074
00075 template <class T>
00076 void print(const vector<T>& v);
00077
00078 }
00079
00080
00081 #define TALOS_FILE_STRING_HXX
00082 #endif