git-2.22.0/utf8.c
/*
 * Returns true (1) if the src encoding name matches the dst encoding
 * name directly or one of its alternative names. E.g. UTF-16BE is the
 * same as UTF16BE.
 */
Returns true (1) if the src encoding name matches the dst encoding
name directly or one of its alternative names.
Returns true ( 1 ) if the src encoding name matches the dst encoding name directly or one of its alternative names .
static int same_utf_encoding(const char *src, const char *dst)
{
	if (istarts_with(src, "utf") && istarts_with(dst, "utf")) {
		int i = (src[3] == '-' ? 4 : 3);
		int j = (dst[3] == '-' ? 4 : 3);
		return !strcasecmp(src+i, dst+j);
	}
	return 0;
}
static int same_utf_encoding ( const char * src , const char * dst ) { if ( istarts_with ( src , " " ) && istarts_with ( dst , " " ) ) { int i = ( src [ 3 ] == ' ' ? 4 : 3 ) ; int j = ( dst [ 3 ] == ' ' ? 4 : 3 ) ; return ! strcasecmp ( src + i , dst + j ) ; } return 0 ; }
Returns true (1) if the src encoding name matches the dst encoding
 name directly or one of its alternative names.
Returns true ( 1 ) if the src encoding name matches the dst encoding name directly or one of its alternative names .
/* src[3] or dst[3] might be '\0' */