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 #ifndef RTC_STRINGTOOLS_H
00020 #define RTC_STRINGTOOLS_H
00021
00022
00023 #include <string>
00024 #include <vector>
00025
00026
00027 namespace rtc {
00028
00030 bool lexical_cast_bool(const std::string& str, const bool bDefault = false);
00032 int lexical_cast_int(const std::string& str, const int nDefault = 0);
00034 float lexical_cast_float(const std::string& str, const float fDefault = 0.0f);
00036 double lexical_cast_double(const std::string& str, const double dDefault = 0.0);
00038 long lexical_cas_long(const std::string& str, const long lDefault = 0);
00040 std::string lexical_cast_string(const double& var);
00042 std::string lexical_cast_string(const float& var);
00044 std::string lexical_cast_string(const bool& var);
00046 std::string lexical_cast_string(const int& var);
00048 void split_string(const std::string& str, std::vector<std::string>& tokens, const std::string& delimiters = " ");
00050 std::string& trim(std::string& str);
00051
00052
00053 }
00054
00055 #endif // RTC_STRINGTOOLS_H defined
00056