![]() | InDesign SDK 20.5 |
Functions | |
| void | ToWstring (const WideString &src, std::wstring &dest) |
| std::wstring | ToWstring (const WideString &src) |
| template<typename T > | |
| ErrorCode | FromString (const WideString &str, T &num) |
| template<typename T > | |
| ErrorCode | FromString (const WideString &str, int32 precision, T &num) |
| template<> | |
| ErrorCode | FromString< PMReal > (const WideString &str, int32 precision, PMReal &num) |
| template<typename T > | |
| ErrorCode | ToString (T num, WideString &str) |
| template<typename T > | |
| ErrorCode | ToString (T num, int32 precision, WideString &str) |
| template<> | |
| ErrorCode | ToString< PMReal > (PMReal num, int32 precision, WideString &str) |
Namespace providing string to numeric and numeric to string conversion routines.
| ErrorCode stringnumeric::FromString | ( | const WideString & | str, |
| T & | num | ||
| ) |
Converts a WideString to a integral or floating point value. \ Note: 8 bit integral types are currently unsupported.
| str | [IN] Source string. \ Valid signed integral form: [whitespace][{-|+}]digit[digits] \ Valid unsigned integral form: [whitespace][+]digit[digits] |
| num | [OUT] Destination integral or floating point type. |
| ErrorCode stringnumeric::FromString | ( | const WideString & | str, |
| int32 | precision, | ||
| T & | num | ||
| ) |
Converts a WideString to a floating point value with a specified precision.
| str | [IN] Source string. |
| precision | [IN] Number of digits after the decimal point. \ -1 for maximum number of display digits. |
| num | [OUT] Destination floating point type. |
| ErrorCode stringnumeric::FromString< PMReal > | ( | const WideString & | str, |
| int32 | precision, | ||
| PMReal & | num | ||
| ) |
Converts a WideString to a PMReal.
| str | [IN] Source string. |
| precision | [IN] Number of digits after the decimal point. \ -1 for maximum number of display digits. |
| num | [OUT] Destination PMReal. |
| ErrorCode stringnumeric::ToString | ( | T | num, |
| WideString & | str | ||
| ) |
Converts a integral value or floating point value to a WideString. \ Floating point values are converted using a display precision of 3.
| num | [IN] Source integral or floating point value. |
| str | [OUT] Destination string. |
| ErrorCode stringnumeric::ToString | ( | T | num, |
| int32 | precision, | ||
| WideString & | str | ||
| ) |
Converts a floating point value to a WideString with a specified precision.
| num | [IN] Source floating point value. |
| precision | [IN] Number of digits after the decimal point. \ -1 for maximum number of display digits. |
| str | [OUT] Destination string. |
| ErrorCode stringnumeric::ToString< PMReal > | ( | PMReal | num, |
| int32 | precision, | ||
| WideString & | str | ||
| ) |
Converts a PMReal to a WideString with a specified precision.
| num | [IN] Source PMReal. |
| precision | [IN] Number of digits after the decimal point. \ -1 for maximum number of display digits. |
| str | [OUT] Destination string. |
| void stringnumeric::ToWstring | ( | const WideString & | src, |
| std::wstring & | dest | ||
| ) |
Converts WideString to a std::wstring. \ Note: wstring uses wchar_t as character type and is 16 bit on Windows and 32 bit on Mac.
| src | [IN] Source string. |
| dest | [OUT] Destination string. |
| inline |
Converts a WideString to a std::wstring. \ Overloaded for convenience. Beware of the cost (return by value). \ Note: wstring uses wchar_t as character type and is 16 bit on Windows and 32 bit on Mac.
| src | [IN] Source string. |