util::ContainsNoNUL

Check if a string does not contain any embedded NUL (0) characters

Synopsis

Declared in <util/string.h>

[[nodiscard]]
bool
ContainsNoNUL(std::string_view str) noexcept;

Return Value

true if str contains no NUL character.

NOTE

The return value should not be discarded.

Parameters

NameDescription
strThe string to inspect.