SDK:Vectorworks 2018 Unicode: Difference between revisions
Jump to navigation
Jump to search
(Created page with "{{LocationMain|category=LocationSDKSpecial|specific=}} == General Information == == TXString == ... info about TXString ... === Formatting === The <code>TXString::Format<...") |
(No difference)
|
Revision as of 18:49, 14 September 2017
.SDK|SDK ..SDK:Types|SDK Types ..SDK:Using the SDK|Using the SDK ..VCOM:VCOM (Vectorworks Component Object Model)|VCOM Basics ..VCOM:Class Reference|VCOM Class Reference
General Information
TXString
... info about TXString ...
Formatting
The TXString::Format
and TXString::VFormat
functions have been removed.
They are replaced by the type-safe functions TXString::Format
and static TXString::Formatted
. These functions require known types to be used:
- short, unsigned short
- int, unsigned int
- long, unsigned long
- long long, unsigned long long
- double
- const char
- const char* -- a UTF-8 encoded string
- const wchar_t
- const wchar_t* -- this type depends on the OS, UTF-16 on Windows and UTF-32 on Mac.
- const void* -- a generic pointer
- TXString
They support the % markers: d, i, u, o, x, X, f, F, e, E, g, G, a, A, c, s, p, n
Numeric Conversions
The functions to convert the string to a number have been preserved:
Sint32 atoi() const; Sint64 atoi64() const; Real64 atof() const;
Additional functions for number to string have been added:
TXString& itoa(Sint64 value); TXString& ftoa(Real64 value); TXString& ftoa(Real64 value, Sint32 precision); static TXString ToStringInt(Sint64 value); static TXString ToStringInt(Sint64 value, Sint32 width, wchar_t paddingChar); static TXString ToStringReal(Real64 value); static TXString ToStringReal(Real64 value, Sint32 precision, bool fixed=true); template<typename T> static TXString ToString(T value); template<typename T> static TXString ToStringHex(T value, bool upperCase = true, size_t symbolsCnt = size_t(-1));