* Exported function to return whether a UTF-8 sequence is legal or not. * This is not used here; it's just exported. */
| 427 | * This is not used here; it's just exported. |
| 428 | */ |
| 429 | Boolean 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, |
no test coverage detected