cartobase  5.0.5
string_conversion.h File Reference
#include <cartobase/config/cartobase_config.h>
#include <cartobase/stream/sstream.h>
#include <string>
#include <vector>
#include <set>
Include dependency graph for string_conversion.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 carto
 

Functions

template<typename T >
std::string carto::toString (const T &object)
 
template<>
std::string carto::toString (const char &object)
 
std::vector< std::string > carto::split (const std::string &text, const std::string &sep)
 
std::vector< std::string > carto::split (const std::string &text, const std::set< std::string > &sep)
 
std::string carto::join (const std::vector< std::string > &pieces, const std::string &sep)
 
std::string carto::stringLower (const std::string &)
 
std::string carto::stringUpper (const std::string &)
 
std::string carto::stringStrip (const std::string &str, char c=' ')
 
bool carto::isInt (const std::string &s)
 Does the string represent a valid integer ? More...
 
bool carto::isFloat (const std::string &s)
 Does the string represent a valid float ? More...
 
template<>
std::string carto::toString (const unsigned char &object)
 
template<>
std::string carto::toString (const signed char &object)
 
template<typename T >
void carto::stringTo (const std::string &value, T &result)
 
template<>
void carto::stringTo< std::string > (const std::string &value, std::string &result)
 
template<>
void carto::stringTo< long > (const std::string &value, long &result)
 
template<>
void carto::stringTo< unsigned long > (const std::string &value, unsigned long &result)
 
template<>
void carto::stringTo< int > (const std::string &value, int &result)
 
template<>
void carto::stringTo< unsigned int > (const std::string &value, unsigned int &result)
 
template<>
void carto::stringTo< unsigned char > (const std::string &value, unsigned char &result)
 
template<>
void carto::stringTo< signed char > (const std::string &value, signed char &result)
 
template<>
void carto::stringTo< char > (const std::string &value, char &result)
 
template<>
void carto::stringTo< unsigned short > (const std::string &value, unsigned short &result)
 
template<>
void carto::stringTo< short > (const std::string &value, short &result)
 
template<>
void carto::stringTo< double > (const std::string &value, double &result)
 
template<>
void carto::stringTo< float > (const std::string &value, float &result)
 
template<>
void carto::stringTo< bool > (const std::string &value, bool &result)
 
std::string carto::quotedString (const std::string &s, char *quote=0, bool with_quotes=true)
 Quote a string in python style: escape quotes (single and double), depending on a quote character. More...