PrevNextUpHome SophiaFramework UNIVERSE 5.3

11.2. Type Conversion

There are two types of strings: "single/multi byte string(ANSI string)" which handles a string as the array of the AChar type and "double byte string" which handles a string as the array of the WChar type. These corresponds to the SFXAnsiString class and the SFXWideString class respectively.

Type conversion between SFXAnsiString and SFXWideString will be automatically performed.

Example 11.24. Type conversion between SFXAnsiString and SFXWideString

// single text label
SFZSingleTextLabelControlSmp single_text_label;

// get text of the SFXWideString type from the single text label
SFXWideString wide_string = single_text_label->GetText();

// type conversion from SFXWideString into SFXAnsiString will be performed automatically
SFXAnsiString ansi_string = wide_string;