|
constexpr | Rune () noexcept |
| Default constructor (creates null character)
|
constexpr | Rune (char32_t codepoint) noexcept |
| Construct a Rune from a Unicode codepoint.
|
constexpr | Rune (char32_t codepoint, language::Code lang) noexcept |
| Construct a Rune with explicit language information.
|
| Rune (char32_t codepoint, language::Code lang, std::string phoneme) |
| Construct a Rune with phonetic representation.
|
constexpr | Rune (const Rune &)=default |
constexpr | Rune (Rune &&) noexcept=default |
constexpr Rune & | operator= (const Rune &)=default |
constexpr Rune & | operator= (Rune &&) noexcept=default |
| ~Rune ()=default |
constexpr char32_t | codepoint () const noexcept |
| Get the Unicode codepoint.
|
constexpr language::Code | language () const noexcept |
| Get the language code.
|
constexpr unicode::Category | category () const noexcept |
| Get the Unicode category.
|
constexpr unicode::Script | script () const noexcept |
| Get the Unicode script.
|
const std::string & | phoneme () const noexcept |
| Get the phonetic representation.
|
constexpr void | set_language (language::Code lang) noexcept |
| Set the language code.
|
void | set_phoneme (std::string phoneme) |
| Set the phonetic representation.
|
constexpr bool | is_vowel () const noexcept |
| Check if this rune represents a vowel.
|
constexpr bool | is_consonant () const noexcept |
| Check if this rune represents a consonant.
|
constexpr bool | is_letter () const noexcept |
| Check if this rune is a letter.
|
constexpr bool | is_digit () const noexcept |
| Check if this rune is a digit.
|
constexpr bool | is_whitespace () const noexcept |
| Check if this rune is whitespace.
|
constexpr bool | is_punctuation () const noexcept |
| Check if this rune is punctuation.
|
constexpr bool | is_ascii () const noexcept |
| Check if this is an ASCII character.
|
constexpr bool | is_latin () const noexcept |
| Check if this is a Latin script character.
|
constexpr bool | is_hangul () const noexcept |
| Check if this is a Hangul (Korean) character.
|
constexpr bool | is_hiragana () const noexcept |
| Check if this is a Hiragana character.
|
constexpr bool | is_katakana () const noexcept |
| Check if this is a Katakana character.
|
constexpr bool | is_kanji () const noexcept |
| Check if this is a Kanji character.
|
constexpr bool | is_emoji () const noexcept |
| Check if this is an emoji character.
|
std::string | to_utf8 () const |
| Convert to UTF-8 string.
|
std::u16string | to_utf16 () const |
| Convert to UTF-16 string.
|
constexpr std::u32string | to_utf32 () const |
| Convert to UTF-32 string.
|
constexpr auto | operator<=> (const Rune &other) const noexcept=default |
| Three-way comparison operator (C++20)
|
constexpr bool | operator== (const Rune &other) const noexcept=default |
| Equality comparison.
|
Represents a single textual unit with Unicode and linguistic properties.
The Rune class encapsulates a Unicode codepoint along with its linguistic attributes such as language, category, and phonetic representation. It serves as the fundamental building block for text processing in the rune-caster framework.
C++20 Enhanced: Supports constexpr operations, comprehensive language detection, and modern C++ features for optimal performance.
Definition at line 23 of file rune.hpp.