base/time/m_time_parse.c
/**
 * returns numerical value for the buffer position
 * consuming at most 'len' but up to next delimiter
 * returns -1 if not a #
 */
returns numerical value for the buffer position
consuming at most 'len' but up to next delimiter
returns -1 if not a
returns numerical value for the buffer position consuming at most ' len ' but up to next delimiter returns - 1 if not a
static M_int64 M_time_getnum(const char **s, int len)
{
	M_int64 x;
	if(!M_chr_isdigit(**s))
		return -1;
	for(x=0; len && **s != 0 && M_chr_isdigit(**s); (*s)++)
	{
		x *= 10;
		x += **s - '0';
		len--;
	}
	return x;
}
static M_int64 M_time_getnum ( const char * * s , int len ) { M_int64 x ; if ( ! M_chr_isdigit ( * * s ) ) return -1 ; for ( x = 0 ; len && * * s != 0 && M_chr_isdigit ( * * s ) ; ( * s ) ++ ) { x *= 10 ; x += * * s - ' ' ; len -- ; } return x ; }
returns numerical value for the buffer position
 consuming at most 'len' but up to next delimiter
 returns -1 if not a
returns numerical value for the buffer position consuming at most ' len ' but up to next delimiter returns - 1 if not a