Skip to content
Snippets Groups Projects
Commit 8e64d35d authored by jwindley's avatar jwindley
Browse files

Stringify large integers

parent 140b6544
No related branches found
No related tags found
No related merge requests found
......@@ -181,6 +181,20 @@ public:
sprintf( buf, fmt ? fmt : "%ld", val );
append( buf );
}
void append( const long int val, const char *fmt = NULL )
{
char buf[ 64 ];
sprintf( buf, fmt ? fmt : "%ld", val );
append( buf );
}
void append( const unsigned long int val, const char *fmt = NULL )
{
char buf[ 64 ];
sprintf( buf, fmt ? fmt : "%lu", val );
append( buf );
}
void operator += ( const u_int32_t val )
{
......@@ -190,7 +204,14 @@ public:
{
append( val );
}
void operator += ( const long int val )
{
append( val );
}
void operator += ( const unsigned long int val )
{
append( val );
}
const size_t length( void ) const
{
return m_population;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment