TachyonUI 0.1.0
High-performance UI for building tools.
Loading...
Searching...
No Matches
tachyon::LanguageTag Struct Reference

A BCP 47 language tag ("ja", "zh-Hant", "ko-KR") stored inline, so text styles stay plain values. More...

#include <gui_core/style/gui_style_text.h>

Public Member Functions

 LanguageTag ()=default
 LanguageTag (std::string_view tag) noexcept
 Copies tag; a tag of 16 characters or more leaves it empty.
bool empty () const noexcept
 No tag set.
const char * c_str () const noexcept
 The tag as a null-terminated string.
std::string_view view () const noexcept
 The tag as a string view.
bool operator== (const LanguageTag &other) const noexcept

Public Attributes

char value [16] = {}
 null-terminated tag

Detailed Description

A BCP 47 language tag ("ja", "zh-Hant", "ko-KR") stored inline, so text styles stay plain values.

Empty = no language of its own. A tag that doesn't fit is dropped (empty).

Constructor & Destructor Documentation

◆ LanguageTag() [1/2]

tachyon::LanguageTag::LanguageTag ( )
default

◆ LanguageTag() [2/2]

tachyon::LanguageTag::LanguageTag ( std::string_view tag)
inlineexplicitnoexcept

Copies tag; a tag of 16 characters or more leaves it empty.

Member Function Documentation

◆ empty()

bool tachyon::LanguageTag::empty ( ) const
inlinenoexcept

No tag set.

◆ c_str()

const char * tachyon::LanguageTag::c_str ( ) const
inlinenoexcept

The tag as a null-terminated string.

◆ view()

std::string_view tachyon::LanguageTag::view ( ) const
inlinenoexcept

The tag as a string view.

◆ operator==()

bool tachyon::LanguageTag::operator== ( const LanguageTag & other) const
inlinenoexcept

Member Data Documentation

◆ value

char tachyon::LanguageTag::value[16] = {}

null-terminated tag


The documentation for this struct was generated from the following file: