OxL Reference

method Utf8.isValid

True when b is well-formed UTF-8.

Example:

oxl✓ checked in CI
fn main() io {
  print("{Utf8.isValid(Utf8.encode("ok"))}")
}
Output
true
pub(api) static fn isValid(b: bytes) -> bool

Since. 1.0.0-beta

Parameters

NameType
bbytes

Returns

bool

Effects

none declared (pure unless the body says otherwise)

Defined in: std/core/text.oxl:1062

See also