Fragment

Fragment takes in a single variable and returns an array that has split it into its components.

TVariable Fragment(
   unsigned int format = 0
);
TVariable Fragment(
   const BYTE *format
);
TVariable Fragment(
   const char16_t *format
);
TVariable Fragment(
   const TVariable &format
);

Parameters

formatformat can be from Parameters.

Return Values

These methods will return the a temporary array which should be saved before use.

Remarks

  • Fragment will be extended in the future to include more operations.
Example Use
TVariable var("This,is,a,comma,separated,string");
MessageBox(var.Fragment(",").ToString().WString());
//returns L"{"This","is","a","comma","separated","string"}";
MessageBox(var.SetUTCTime().Fragment(TVariable::TIME_ZONE_LOCAL)
   .ToString().WString());
//returns L"{"year"=>2012,"month"=>1,"day"=>28,"dayOfWeek"=>6,
//   "hour"=>9,"minute"=>0,"second"=>1,"milliseconds"=>970}"

Since

TScript Version 1.3.0

Also See

ToString
Comments (0)Listen All
Characters left: 2500
 
Ekky Software Homepage Ekky Software Homepage ObjectDatabase++ TScript Ekky Software Homepage Ekky Software Homepage ObjectDatabase++ TScript