* Exported function to return whether a UTF-8 sequence is legal or not. * This is not used here; it's just exported. */
| 410 | * This is not used here; it's just exported. |
| 411 | */ |
| 412 | Boolean isLegalUTF8Sequence(const UTF8 *source, const UTF8 *sourceEnd) { |
| 413 | int length = trailingBytesForUTF8[*source]+1; |
| 414 | if (length > sourceEnd - source) { |
| 415 | return false; |
| 416 | } |
| 417 | return isLegalUTF8(source, length); |
| 418 | } |
| 419 | |
| 420 | /* --------------------------------------------------------------------- */ |
| 421 |
no test coverage detected