std1.0.0-beta-7 SafeC docs

std :: encoding::utf8

Function std::utf8_encoded_len

#include <std/encoding/utf8.h> source · definition

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.