NSUNI/NSLAR Library a250670
Loading...
Searching...
No Matches
utf8.hpp File Reference

Provides utilities for working with the UTF-8 encoding. More...

#include <string>
#include <string_view>

Go to the source code of this file.

Namespaces

namespace  nnl
namespace  nnl::utl::utf8
 Provides utilities for working with the UTF-8 encoding.

Functions

bool nnl::utl::utf8::IsValid (std::string_view str)
 Checks if string contains valid UTF-8 encoding.
std::size_t nnl::utl::utf8::GetSize (std::string_view str, std::size_t pos=0)
 Gets size of UTF-8 character at position.
char32_t nnl::utl::utf8::Decode (std::string_view str, std::size_t pos=0)
 Decodes UTF-8 character to Unicode code point.
std::string nnl::utl::utf8::Encode (char32_t codepoint)
 Encodes Unicode code point to UTF-8.
bool nnl::utl::utf8::IsRightToLeft (char32_t codepoint)
 Checks if a Unicode code point belongs to a right-to-left script or has RTL directionality.
bool nnl::utl::utf8::IsASCII (std::string_view str)
 Checks if a string contains only characters from the basic ASCII set.

Detailed Description

Provides utilities for working with the UTF-8 encoding.