ToString
ToString formats and return a string valid for printing. This can cast a TVariable from a none string type, including a structure or array and return an acsii string ready for printing.
TVariable ToString( unsigned int format = 0, TVariable ¶meters = TVariable() ); TVariable ToString( const TVariable &format TVariable ¶meters = TVariable() );
Parameters
format | Format can vary from Parameters to standard c language printf style strings. |
Return Values
These methods will return the modified TVariable, or a temporary const TVariable created on the stack.
Remarks
Example Use
- C++
#include "TScript.h" int wmain(int argc, wchar_t* argv[]) { TVariable var("123"), params; params[u"RootLabel"] = "value"; var = var.Integer() + 10; MessageBox((wchar_t*)var.ToString(TVariable::XML,params).WString()); //should show "<value>133</value>" return NO_ERROR; }
Also See
Casting Operators, Assignment OperatorsListen All
Comments (0)