Struct UIString
Container for UI string - either raw value or string resource ID
Set resource id (string) or plain unicode text (dstring) to it, and get dstring.
Constructors
| Name | Description |
this
(id)
|
|
this
(value)
|
create string with raw value; deprecated, use fromRaw() instead
|
this
(id, fallbackValue)
|
create string with resource id and raw value as fallback for missing translations
|
Properties
| Name | Type | Description |
id[get]
|
string | Returns string resource id
|
id[set]
|
string | Sets string resource id
|
value[get]
|
dstring | Get value (either raw or translated by id)
|
value[set]
|
dstring | Set raw value using property
|
Methods
| Name | Description |
empty
()
|
returns true if string is empty: neither resource nor string is assigned
|
fromId
(ID, fallback)
|
create UIString from id - will be translated; fallback value can be provided for cases if translation is not found
|
fromRaw
(rawValue)
|
Create UIString from raw utf32 string value - will not be translated
|
fromRaw
(rawValue)
|
Create UIString from raw utf8 string value - will not be translated
|
opAssign
(rawValue)
|
Assign raw value
|
opAssign
(ID)
|
Assign string resource id
|