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

Function getUTF8SequenceSize

3rdparty/ConvertUTF/ConvertUTF.cpp:441–445  ·  view source on GitHub ↗

* Exported function to return the size of the first utf-8 code unit sequence, * Or 0 if the sequence is not valid; */

Source from the content-addressed store, hash-verified

439 * Or 0 if the sequence is not valid;
440 */
441unsigned getUTF8SequenceSize(const UTF8 *source, const UTF8 *sourceEnd) {
442 int length = trailingBytesForUTF8[*source] + 1;
443 return (length <= sourceEnd - source && isLegalUTF8(source, length)) ? length
444 : 0;
445}
446
447/* --------------------------------------------------------------------- */
448

Callers 3

countUTF8CharsFunction · 0.85
getUTF8ByteOffsetFunction · 0.85
eraseUTF8CharAtFunction · 0.85

Calls 1

isLegalUTF8Function · 0.85

Tested by

no test coverage detected