OxL Reference

method T.isNull

True for the null pointer.

Example:

oxl✓ checked in CI
import c "string.h" { strchr }

fn main() io {
  let s = "hello".toCString()
  let hit = unsafe { strchr(s.asPtr(), 122) }
  print("{hit.isNull()}")
}
Output
true
pub(api) move fn isNull() -> bool

Since. 1.0.0-beta

Returns

bool

Effects

none declared (pure unless the body says otherwise)

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

See also