OxL Reference

method CString.len

Length without the terminating NUL.

Example:

oxl✓ checked in CI
fn main() io {
  print("{"hello".toCString().len()}")
}
Output
5
pub(api) fn len() -> usize

Complexity. O(1).

Since. 1.0.0-beta

Returns

usize

Effects

none declared (pure unless the body says otherwise)

Defined in: std/ffi/ffi.oxl:70

See also