futility/updater_archive.c
/* Returns 1 if name ends by given pattern, otherwise 0. */
Returns 1 if name ends by given pattern, otherwise 0.
Returns 1 if name ends by given pattern otherwise 0 .
static int str_endswith(const char *name, const char *pattern)
{
	size_t name_len = strlen(name), pattern_len = strlen(pattern);
	if (name_len < pattern_len)
		return 0;
	return strcmp(name + name_len - pattern_len, pattern) == 0;
}
static int str_endswith ( const char * name , const char * pattern ) { size_t name_len = strlen ( name ) , pattern_len = strlen ( pattern ) ; if ( name_len < pattern_len ) return 0 ; return strcmp ( name + name_len - pattern_len , pattern ) == 0 ; }
Returns 1 if name ends by given pattern, otherwise 0.
Returns 1 if name ends by given pattern otherwise 0 .