Wt  4.11.1
Public Member Functions | Public Attributes | List of all members
Wt::LocalizedString Class Reference

The result of resolving a localized string. More...

Public Member Functions

 LocalizedString ()
 Constructor for an unsuccessful localized string result. More...
 
 LocalizedString (std::string v, TextFormat f)
 Constructor for a successful localized string result. More...
 
 operator bool () const
 Bool conversion, for checking success.
 

Public Attributes

std::string value
 The value of the resolved localized string. More...
 
TextFormat format
 The format that the resolved localized string is stored in (TextFormat::Plain or TextFormat::XHTML)
 
bool success
 Indicates whether resolving the string was successful.
 

Detailed Description

The result of resolving a localized string.

This struct contains the result (in UTF-8 encoding) of resolving a localized string, consisting of its value, its format (TextFormat::Plain or TextFormat::XHTML), and a success value indicating whether the string was successfully resolved.

Constructor & Destructor Documentation

◆ LocalizedString() [1/2]

Wt::LocalizedString::LocalizedString ( )

Constructor for an unsuccessful localized string result.

This constructor sets success to false.

◆ LocalizedString() [2/2]

Wt::LocalizedString::LocalizedString ( std::string  v,
TextFormat  f 
)

Constructor for a successful localized string result.

Sets the value to the given string, and the format to the given format, and sets success to true.

Member Data Documentation

◆ value

std::string Wt::LocalizedString::value

The value of the resolved localized string.

This value is UTF-8 encoded