ludus::foundation::Utf8View¶
Ludus Wiki · API overview · Browse API
Class
Borrowed validation proof, in bytes.
Only ValidateUtf8 sets a nonempty view; a default-constructed proof holds an empty view, which is valid UTF-8. The proof borrows the validated bytes and does not keep them alive. Mutating the source invalidates the proof. No normalization, grapheme, display-width or Unicode case-folding claims.
Declared in modules/foundation/strings/include/ludus/foundation/strings/utf8.hpp
#include <ludus/foundation/strings/utf8.hpp>
class ludus::foundation::Utf8View final
Methods¶
GetView¶
std::string_view ludus::foundation::Utf8View::GetView() const noexcept
Borrowed counted view of the validated bytes; sizes count bytes, not scalars.
Valid only while the source storage passed to ValidateUtf8 is alive and unchanged.
Declared in modules/foundation/strings/include/ludus/foundation/strings/utf8.hpp