sqlines/str.cpp
// Skip comments, spaces, new lines and tabs
Skip comments, spaces, new lines and tabs
Skip comments spaces new lines and tabs
char* Str::SkipComments(const char *input)
{
	if(input == NULL)
		return NULL;
	char *cur = (char*)input;
	while(*cur)
	{
		cur = Str::SkipSpaces(cur);
		if((*cur == '-' && cur[1] == '-') || (*cur == '/' && cur[1] == '/'))
		{
			while(*cur && *cur != '\n')
				cur++;
		}
		else
			break;
	}
	return cur;
}
char * Str :: SkipComments ( const char * input ) { if ( input == NULL ) return NULL ; char * cur = ( char * ) input ; while ( * cur ) { cur = Str :: SkipSpaces ( cur ) ; if ( ( * cur == ' ' && cur [ 1 ] == ' ' ) || ( * cur == ' ' && cur [ 1 ] == ' ' ) ) { while ( * cur && * cur != ' \n ' ) cur ++ ; } else break ; } return cur ; }
Skip comments, spaces, new lines and tabs
Skip comments spaces new lines and tabs
// Single line comment