+//[whitespaces][+|-][nnnnn][.nnnnn][e|E[+|-]nnnn]
+//(where whitespaces are any tab or space character and nnnnn may be any number of digits)
+inline bool string_is_float_zero( const char* string ){
+ string = string_remove_whitespace( string );
+ if ( string_empty( string ) ) {
+ return false;
+ }
+
+ string = string_remove_sign( string );
+ if ( string_empty( string ) ) {
+ // no whole number or fraction part
+ return false;
+ }
+
+ // whole-number part
+ string = string_remove_zeros( string );
+ if ( string_empty( string ) ) {
+ // no fraction or exponent
+ return true;
+ }
+ if ( *string == '.' ) {
+ // fraction part
+ if ( *string++ != '0' ) {
+ // invalid fraction
+ return false;
+ }
+ string = string_remove_zeros( ++string );
+ if ( string_empty( string ) ) {
+ // no exponent
+ return true;
+ }
+ }
+ if ( *string == 'e' || *string == 'E' ) {
+ // exponent part
+ string = string_remove_sign( ++string );
+ if ( *string++ != '0' ) {
+ // invalid exponent
+ return false;
+ }
+ string = string_remove_zeros( ++string );
+ if ( string_empty( string ) ) {
+ // no trailing whitespace
+ return true;
+ }
+ }
+ string = string_remove_whitespace( string );
+ return string_empty( string );
+}
+
+inline double buffer_parse_floating_literal( const char*& buffer ){
+ return strtod( buffer, const_cast<char**>( &buffer ) );
+}
+
+inline int buffer_parse_signed_decimal_integer_literal( const char*& buffer ){
+ return strtol( buffer, const_cast<char**>( &buffer ), 10 );
+}
+
+inline int buffer_parse_unsigned_decimal_integer_literal( const char*& buffer ){
+ return strtoul( buffer, const_cast<char**>( &buffer ), 10 );