stats.c
int empty_path_check(char *path)
{
	int i, index = 0;

	if (!path)
		return (-1);
	for (i = 0; path[i]; i++)
	{
		if (i == 0 && path[i] == ':')
			return (0);
		if (path[i] == ':')
			index++;
		if (path[i] == ':' && path[i + 1] == ':')
			return (index);
		if (path[i] == ':' && path[i + 1] == 00)
			return (index);
	}
	return (-1);
}
/**
 * empty_path_check - checks the path value for an empty field
 * @path: path value string
 * Return: future token index before which current directory should be checked,
 * or -1 if none found
 */
checks the path value for an empty field
@path: path value string
Return: future token index before which current directory should be checked,
or -1 if none found
checks the path value for an empty field @path : path value string Return : future token index before which current directory should be checked or - 1 if none found
int empty_path_check(char *path)
{
	int i, index = 0;
	if (!path)
		return (-1);
	for (i = 0; path[i]; i++)
	{
		if (i == 0 && path[i] == ':')
			return (0);
		if (path[i] == ':')
			index++;
		if (path[i] == ':' && path[i + 1] == ':')
			return (index);
		if (path[i] == ':' && path[i + 1] == 00)
			return (index);
	}
	return (-1);
}
int empty_path_check ( char * path ) { int i , index = 0 ; if ( ! path ) return ( -1 ) ; for ( i = 0 ; path [ i ] ; i ++ ) { if ( i == 0 && path [ i ] == ' ' ) return ( 0 ) ; if ( path [ i ] == ' ' ) index ++ ; if ( path [ i ] == ' ' && path [ i + 1 ] == ' ' ) return ( index ) ; if ( path [ i ] == ' ' && path [ i + 1 ] == 00 ) return ( index ) ; } return ( -1 ) ; }
empty_path_check - checks the path value for an empty field
 @path: path value string
 Return: future token index before which current directory should be checked,
 or -1 if none found
empty_path_check - checks the path value for an empty field @path : path value string Return : future token index before which current directory should be checked or - 1 if none found