A helper class to manipulate string (token, convert, ...). More...
Static Public Member Functions | |
template<typename T > | |
static T | value_of (const std::string &in, bool *is_ok=0) |
return the value of the given string | |
template<typename T > | |
static std::vector< T > | value_of (const std::vector< std::string > &in, bool *is_ok=0) |
return the value of the given vector of string | |
template<typename T > | |
static std::string | to_string (const T &t) |
get the string corresponding to the given value | |
static std::string | zero_padding (const std::string &input, const int &zero_number=4) |
fill the appropriate number of zero to have the same size | |
static std::string | to_lower (const std::string &input) |
return the lower case of a string | |
static std::string | to_upper (const std::string &input) |
return the upper case of a string | |
static std::vector< std::string > | delete_empty (const std::vector< std::string > &in) |
delete the empty space of a vector of string |
A helper class to manipulate string (token, convert, ...).
A class to convert a string into value or value into string
std::vector< std::string > mesh_conv::MC_string_converter::delete_empty | ( | const std::vector< std::string > & | in | ) | [static] |
delete the empty space of a vector of string
std::string mesh_conv::MC_string_converter::to_lower | ( | const std::string & | input | ) | [static] |
return the lower case of a string
static std::string mesh_conv::MC_string_converter::to_string | ( | const T & | t | ) | [inline, static] |
get the string corresponding to the given value
example: std::string val=mesh_convMC_string_converter::to_string(4.0*78.5);
Referenced by draw_fps().
std::string mesh_conv::MC_string_converter::to_upper | ( | const std::string & | input | ) | [static] |
return the upper case of a string
static std::vector<T> mesh_conv::MC_string_converter::value_of | ( | const std::vector< std::string > & | in, | |
bool * | is_ok = 0 | |||
) | [inline, static] |
return the value of the given vector of string
static T mesh_conv::MC_string_converter::value_of | ( | const std::string & | in, | |
bool * | is_ok = 0 | |||
) | [inline, static] |
return the value of the given string
example: double val=mesh_convMC_string_converter::value_of<double> ("4.54");
std::string mesh_conv::MC_string_converter::zero_padding | ( | const std::string & | input, | |
const int & | zero_number = 4 | |||
) | [static] |
fill the appropriate number of zero to have the same size
exemple zero_padding("62",5)="00062"
exemple zero_padding("c;7",4)="0x;7"