Copy will copy the cotents of newValue to an ascii, wide charactor or biniary string, from the offset location for a given length.

TVariable& Copy(
   const TVariable &newValue,
   int offset = 0,
   int length = 0


newValuethe new value.
offsetthe start location, in bytes from the start of the string. If start is negative, the returned string will start at the start 'th character from the end of string.
lengththis will cut this length from start. It this value is zero then the remaining length of the string will be returned. If length is given and is negative, then that many characters will be omitted from the end of string (after the start position has been calculated when a start is negative).

Return Values

This method will return the a temporary const value created on the stack.


  • This method will return a TVariable of the same type as the original TVariable.
Example Use
  • C++
#include "TScript.h"

int wmain(int argc, wchar_t* argv[])
   TVariable var("123");
   MessageBox(NULL,(wchar_t*)var.WString(),L"",0);//return "125"
   return NO_ERROR;

Also See

Assignment Operators, Position, Substring, StringReplace
Listen All
Comments (0)
Characters left: 2500
Ekky Software Homepage T-Accounts Online ObjectDatabase++ TScript Ekky Software Homepage T-Accounts Onlinee ObjectDatabase++ TScript