[#mp_units-symbol_text-032-2constructor-01] = xref:mp_units.adoc[mp_units]::xref:mp_units/symbol_text-032.adoc[symbol_text]::symbol_text :relfileprefix: ../../ :mrdocs: Constructors == Synopses Declared in `<mp‐units/framework/symbol_text.h>` Constructs a symbol text from a single character [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- [[nodiscard]] constexpr explicit(false) xref:mp_units/symbol_text-032/2constructor-05.adoc[symbol_text](char ch); ---- [.small]#xref:mp_units/symbol_text-032/2constructor-05.adoc[_» more..._]# Constructs a symbol text from a fixed string [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- [[nodiscard]] constexpr explicit(false) xref:mp_units/symbol_text-032/2constructor-0f.adoc[symbol_text](xref:mp_units/fixed_string.adoc[fixed_string<N>] const& txt); ---- [.small]#xref:mp_units/symbol_text-032/2constructor-0f.adoc[_» more..._]# Constructs a symbol text from a narrow string literal [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- [[nodiscard]] consteval explicit(false) xref:mp_units/symbol_text-032/2constructor-0a.adoc[symbol_text](char const(& txt)[]); ---- [.small]#xref:mp_units/symbol_text-032/2constructor-0a.adoc[_» more..._]# Constructs a symbol text from separate UTF‐8 and portable fixed strings [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- [[nodiscard]] constexpr xref:mp_units/symbol_text-032/2constructor-0c.adoc[symbol_text]( xref:mp_units/fixed_u8string.adoc[fixed_u8string<N>] const& utf8, xref:mp_units/fixed_string.adoc[fixed_string<M>] const& portable); ---- [.small]#xref:mp_units/symbol_text-032/2constructor-0c.adoc[_» more..._]# Constructs a symbol text from separate UTF‐8 and portable string literals [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- [[nodiscard]] consteval xref:mp_units/symbol_text-032/2constructor-04.adoc[symbol_text]( char8_t const(& u)[], char const(& a)[]); ---- [.small]#xref:mp_units/symbol_text-032/2constructor-04.adoc[_» more..._]# == Return Value [NOTE] ==== The return value https://en.cppreference.com/cpp/language/attributes/nodiscard[should not be discarded^]. ==== == Parameters [cols="1,4"] |=== | Name| Description | *ch* | character used for both the UTF‐8 and the portable rendering | *txt* | fixed string used for both the UTF‐8 and the portable rendering | *utf8* | fixed string defining the UTF‐8 rendering | *portable* | fixed string defining the portable rendering | *u* | UTF‐8 string literal defining the UTF‐8 rendering | *a* | narrow string literal defining the portable rendering |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#