std::core::string

is_zstr

fn bool String.is_zstr(self) @deprecated("Unsafe, use copy instead")
Determine whether the current string actually points to a ZString-like string.

This is done by looking at the byte one step after the end of the string. If this
is zero, it is considered zero terminated.

This function can safely be used with data pointing to null. However, it will not
work correctly if the pointer is invalid, for example it is already freed.

Parameters