MCPcopy Create free account
hub / github.com/axmolengine/axmol / isLegalUTF8Sequence

Function isLegalUTF8Sequence

3rdparty/ConvertUTF/ConvertUTF.cpp:429–435  ·  view source on GitHub ↗

* Exported function to return whether a UTF-8 sequence is legal or not. * This is not used here; it's just exported. */

Source from the content-addressed store, hash-verified

427 * This is not used here; it's just exported.
428 */
429Boolean isLegalUTF8Sequence(const UTF8 *source, const UTF8 *sourceEnd) {
430 int length = trailingBytesForUTF8[*source]+1;
431 if (length > sourceEnd - source) {
432 return false;
433 }
434 return isLegalUTF8(source, length);
435}
436
437/*
438 * Exported function to return the size of the first utf-8 code unit sequence,

Callers 2

detectNonAsciiUTF8Function · 0.85

Calls 1

isLegalUTF8Function · 0.85

Tested by

no test coverage detected