Home Texas Home

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 ToString(
   const wchar_t *format
);

TVariable ToString(
   const TVariable &format
);
	

Parameters

format Format can vary from Parameters to standard c language printf style strings

Return Values

These methods will return the a temporary const value created on the stack.

Remarks

  • ToString will create a 16-bit unicode string, if you require UTF-8 string, then you must cast it to AString to get the correct results.
  • Example Use

    TVariable var("123");
    var = var.Integer() + 10;
    MessageBox(var.ToString("The value is %d"));//return "The value is 133"
    
    

    Also See

    Casting Operators

    Copyright © 2007, Ekky Software Pty Ltd.