Skip to main content

nova_rt_bytes_is_utf8

Function nova_rt_bytes_is_utf8 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn nova_rt_bytes_is_utf8( b: *const NovaStr, ) -> i8
Expand description

Whether b’s bytes are valid UTF-8.

Paired with nova_rt_bytes_to_string_unchecked so std/bytes’s to_string can be a Nova-level if, rather than needing a status-code protocol for what is one boolean.

§Safety

b must point to a live NovaStr.