Function lrs::util::strlen

Returns the length of a C string.

Syntax

unsafe fn strlen(ptr: *const u8) -> usize

Arguments

NameDescription
ptr

A pointer to the string.

Return value

Returns the length of the string excluding the terminating null byte.

Remarks

If the argument does not point to a null terminated string, the behavior is undefined.