Function std::utf8_decode
int utf8_decode(const &char s, unsigned long pos, &unsigned int cp_out)Decodes one codepoint starting at 's[pos]'. On success, writes the codepoint to '*cp_out' and returns the number of bytes consumed (1-4). On a malformed sequence (bad continuation byte, overlong encoding, encoded surrogate, or truncated multi-byte sequence at a NUL/end-of-buffer), returns 0 and '*cp_out' is unspecified.