Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00025 #ifndef TLEFUNC_H
00026 #define TLEFUNC_H
00027
00028 #include <string>
00029 #include <ctime>
00030
00031 namespace tlelib
00032 {
00033
00041 std::string int2string(const int val, const std::size_t fieldLength = 0, const bool leftAlign = true);
00042
00053 std::string double2string(const double val, const std::size_t fieldLength, const std::size_t precission=6, const bool scientific=false, const bool decimalPointAssumed = false, const bool leftAlign = true);
00054
00063 std::string string2string(const std::string &str, const std::size_t fieldLength, const bool leftAlign = true, const bool allowCutOff = true);
00064
00072 std::string date2string(const double date, const std::size_t fieldLength, const bool leftAlign = true);
00073
00079 int string2int(const std::string &str);
00080
00086 double string2double(const std::string &str);
00087
00093 double string2date(const std::string &str);
00094
00100 std::string trim(const std::string& str);
00101
00108 char parseChar(const std::string *line, const std::size_t index);
00109
00117 std::string parseString(const std::string *line, const std::size_t start, const std::size_t length);
00118
00126 int parseInt(const std::string *line, const std::size_t start, const std::size_t length);
00127
00136 double parseDouble(const std::string *line, const std::size_t start, const std::size_t length, const bool decimalPointAssumed=false);
00137
00143 int checksum(const std::string &str);
00144
00145 }
00146 #endif // TLEFUNC_H