method Utf8.isValid
True when b is well-formed UTF-8.
Example:
fn main() io {
print("{Utf8.isValid(Utf8.encode("ok"))}")
}Output
true
pub(api) static fn isValid(b: bytes) -> boolSince. 1.0.0-beta
Parameters
| Name | Type |
|---|---|
b | bytes |
Returns
bool
Effects
none declared (pure unless the body says otherwise)
Defined in: std/core/text.oxl:1062