OxL Reference

fn zeroBytes

A list of n zero bytes: a buffer for C functions that fill memory (buf.asPtr()).

Example:

oxl✓ checked in CI
use std.ffi { zeroBytes }

fn main() io {
  print("{zeroBytes(3)}")
}
Output
[0, 0, 0]
pub(api) fn zeroBytes(n: usize) -> List<u8>

Complexity. O(n).

Since. 1.0.0-beta

Parameters

NameType
nusize

Returns

List<u8>

Effects

none declared (pure unless the body says otherwise)

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

See also