#include <assert.h>#include <ctype.h>#include <stdio.h>#include <string.h>#include "sqlite3.h"
Go to the source code of this file.
Functions | |
| static int | isNumber (const char *z, int *realnum) |
| int | sqliteIsNumber (const char *c) |
| static int isNumber | ( | const char * | z, | |
| int * | realnum | |||
| ) | [static] |
Determines if a string is a number of not.
Definition at line 24 of file gs_storage_sqlite_util.c.
{
if( *z=='-' || *z=='+' ) z++;
if( !isdigit(*z) ){
return 0;
}
z++;
if( realnum ) *realnum = 0;
while( isdigit(*z) ){ z++; }
if( *z=='.' ){
z++;
if( !isdigit(*z) ) return 0;
while( isdigit(*z) ){ z++; }
if( realnum ) *realnum = 1;
}
if( *z=='e' || *z=='E' ){
z++;
if( *z=='+' || *z=='-' ) z++;
if( !isdigit(*z) ) return 0;
while( isdigit(*z) ){ z++; }
if( realnum ) *realnum = 1;
}
return *z==0;
}

| int sqliteIsNumber | ( | const char * | c | ) |
Definition at line 50 of file gs_storage_sqlite_util.c.
{
return isNumber(c,0);
}

1.6.3-20100507