60 for (
unsigned int i = 0; i < s.size(); i++ )
62 if ( ( i == 0 ) && ( s[ 0 ] ==
'-' ) )
67 if ( ( s[ i ] >=
'0' ) && ( s[ i ] <=
'9' ) )
70 hulp += ( s[ i ] -
'0' );
109 unsigned int hulp = 0;
111 for (
unsigned int i = 0; i < s.size(); i++ )
113 if ( ( s[ i ] >=
'0' ) && ( s[ i ] <=
'9' ) )
116 hulp += ( s[ i ] -
'0' );
145 for (
int j = 0; t != 0; j++ )
149 if ( ( i / t ) == 0 )
161 hulp += (
'0' + ( i / t ) );
172 buffer[ 127 ] =
'\0';
175 int post = int( ( f - pre ) * 1000.0 );
180 if ( pre == 0 && f < 0.0 )
188 _snprintf( buffer, 127,
"%c%d.%03d", s, pre, post );
190 snprintf( buffer, 127,
"%c%d.%03d", s, pre, post );
192 return string(buffer);
string float_to_string(float f)
int string_to_int(const string &s)
converts a string to an int
string unsigned_int_to_string(unsigned int u)
unsigned int string_to_unsigned_int(const string &s)
string int_to_string(int i)
char string_to_char(const string &s)