utf8.c
static inline size_t utf8_length_for_codepoint(codepoint_t cp)
{
	size_t len = 0;
	for (unicode_hint_t **u = utf8; (*u)->bits_stored; ++u) {
		if ((cp >= (*u)->beg) && (cp <= (*u)->end)) {
			break;
		}
		++len;
	}
	
	if (len > 4) {
		abort();
	}
	
	return len;
}
/* Returns the number of bytes in UTF-8 required to represent the specified unicode 
 * code point. */
Returns the number of bytes in UTF-8 required to represent the specified unicode
code point.
Returns the number of bytes in UTF - 8 required to represent the specified unicode code point .
static inline size_t utf8_length_for_codepoint(codepoint_t cp)
{
	size_t len = 0;
	for (unicode_hint_t **u = utf8; (*u)->bits_stored; ++u) {
		if ((cp >= (*u)->beg) && (cp <= (*u)->end)) {
			break;
		}
		++len;
	}
	if (len > 4) {
		abort();
	}
	return len;
}
static inline size_t utf8_length_for_codepoint ( codepoint_t cp ) { size_t len = 0 ; for ( unicode_hint_t * * u = utf8 ; ( * u ) -> bits_stored ; ++ u ) { if ( ( cp >= ( * u ) -> beg ) && ( cp <= ( * u ) -> end ) ) { break ; } ++ len ; } if ( len > 4 ) { abort ( ) ; } return len ; }
Returns the number of bytes in UTF-8 required to represent the specified unicode
 code point.
Returns the number of bytes in UTF - 8 required to represent the specified unicode code point .