"text" (langString::text)
The function returns the text of a langString. The given parameter defines the language that is returned.
Synopsis
string langString.text();
string langString.text(int index);
string langString.text(string lang);
string langString.text(OaLanguage lang);
string langString.text(int index, OaLanguage &lang);
Parameters
Parameter | Description |
---|---|
index | index of the language entry |
lang | string or OaLanguage enum that defines a language |
&lang | OaLanguage enum variable in which the language is saved |
Return Value
Depending on the given parameter the return value can be:
Parameter | Return value |
---|---|
- | text in the currently active language |
int index | the text in the language with the given index |
string lang | the text in the language defined by the string |
OaLanguage lang | the text in the language defined by the enum |
int index, OaLanguage lang | the text in the language with the given index and the return parameter for the language. The languages are saved in the return parameter lang of the type OaLanguage enum |
Errors
invalid arguments
Description
The function returns the text from a langString. The given parameter defines which language is returned.
Example
A langString is created and the text in the active language is displayed.
main()
{
dyn_string word;
word[1] = "Information";
word[2] = "information";
langString langWord = word;
DebugN( langWord.text() );
}
Assignment
Miscellaneous Functions
Availability
CTRL