MCPcopy Create free account
hub / github.com/ablab/spades / isLegalUTF8String

Function isLegalUTF8String

ext/src/llvm/ConvertUTF.cpp:529–537  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

527 * This is not used here; it's just exported.
528 */
529Boolean isLegalUTF8String(const UTF8 **source, const UTF8 *sourceEnd) {
530 while (*source != sourceEnd) {
531 int length = trailingBytesForUTF8[**source] + 1;
532 if (length > sourceEnd - *source || !isLegalUTF8(*source, length))
533 return false;
534 *source += length;
535 }
536 return true;
537}
538
539/* --------------------------------------------------------------------- */
540

Callers 1

isUTF8Function · 0.85

Calls 1

isLegalUTF8Function · 0.85

Tested by

no test coverage detected