Function std::utf8_encoded_len
int utf8_encoded_len(unsigned int cp)Number of bytes a codepoint encodes to (1-4), or 0 if invalid — the size utf8_encode would need without actually writing anything.
int utf8_encoded_len(unsigned int cp)Number of bytes a codepoint encodes to (1-4), or 0 if invalid — the size utf8_encode would need without actually writing anything.