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 #include "Date.hxx"
00024
00025 namespace Talos
00026 {
00027
00028 template<typename T>
00029 string to_str(const T& input);
00030
00031 string fill(const string& input, int l = 2, char c = ' ',
00032 ostringstream::fmtflags flags = ostringstream::left);
00033
00034 template<typename T>
00035 string to_str_fill(const T& input, int l = 2, char c = ' ',
00036 ostringstream::fmtflags flags = ostringstream::left);
00037
00038 template <class T>
00039 void to_num(const string& s, T& num);
00040
00041 template <class T>
00042 T to_num(const string& s);
00043
00044 template <class T>
00045 void convert(const string& s, T& num);
00046 void convert(const string& s, string& num);
00047
00048 template <class T>
00049 T convert(const string& s);
00050
00051 string lower_case(string str);
00052 string upper_case(string str);
00053
00054 bool is_num(const string& s);
00055
00056 bool is_integer(const string& s);
00057
00058 bool is_unsigned_integer(const string& s);
00059
00060 bool is_date(const string& s);
00061
00062 bool is_delta(const string& s);
00063
00064 string find_replace(string str, string old_str, string new_str = "");
00065
00066 string trim(string str, string delimiters = " \n\t");
00067
00068 string trim_beg(string str, string delimiters = " \n\t");
00069
00070 string trim_end(string str, string delimiters = " \n\t");
00071
00072 template <class T>
00073 void split(string str, vector<T>& vect, string delimiters = " \n\t");
00074 vector<string> split(string str, string delimiters = " \n\t");
00075
00076 template <class T>
00077 void split_markup(string str, vector<T>& elements, vector<bool>& is_markup,
00078 string delimiters = "$");
00079
00080 template <class T>
00081 void print(const vector<T>& v);
00082
00083 }
00084
00085
00086 #define TALOS_FILE_STRING_HXX
00087 #endif