method CString.len
Length without the terminating NUL.
Example:
fn main() io {
print("{"hello".toCString().len()}")
}Output
5
pub(api) fn len() -> usizeComplexity. 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