Skip to content
Snippets Groups Projects
string.cpp 611 B
Newer Older
  • Learn to ignore specific revisions
  • Jan Trávníček's avatar
    Jan Trávníček committed
     * string.cpp
    
     *
     * Created on: Apr 1, 2013
     * Author: Jan Travnicek
     */
    
    
    Jan Trávníček's avatar
    Jan Trávníček committed
    #include <string>
    
    #include <sstream>
    
    namespace std {
    
    
    template < >
    string to_string ( const string & value ) {
    	return value;
    
    template < >
    string from_string ( const string & value ) {
    	return value;
    
    template < >
    int from_string ( const string & value ) {
    	return stoi__private ( value.c_str() );
    }
    
    template < >
    unsigned from_string ( const string & value ) {
    	return stoul__private ( value.c_str() );
    
    }
    
    string cstringToString ( char * param ) {
    	string res ( param );
    
    	free ( param );
    	return res;
    
    Jan Trávníček's avatar
    Jan Trávníček committed
    } /* namespace std */