sqlparser/file.cpp
// Get the position of file extension
Get the position of file extension
Get the position of file extension
int File::GetExtensionPosition(const char *path)
{
	if(path == NULL)
		return -1;
	int i = 0;
	int dot = -1;
	while(path[i] != 0)
	{
		if(path[i] == '.')
			dot = i;
		i++;
	}
	if(dot != -1)
		return dot;
	return i;
}
int File :: GetExtensionPosition ( const char * path ) { if ( path == NULL ) return -1 ; int i = 0 ; int dot = -1 ; while ( path [ i ] != 0 ) { if ( path [ i ] == ' ' ) dot = i ; i ++ ; } if ( dot != -1 ) return dot ; return i ; }
Get the position of file extension
Get the position of file extension
// find the position of the last dot // If not found, return the index of terminating 0