Position

Position will find the occurance of a given fragment after the start offset.

int Position(
   const BYTE *search,
   int start = 0
);

int Position(
   const char16_t *search,
   int start = 0
);

int Position(
   const TVariable &search,
   int start = 0,
   int atom = 0
);

Parameters

search The pattern string to match. The TVariable version can match arrays of string and will return the position of the first match.
start This is the byte offset of the start location. If start is negative, the returned string will start at the start 'th character from the end of string and search backward.
atom This is the size of the blocks to match, for astring atom is 1 and for wstring it is 2.

Return Values

If the fragment is not matched, then -1 is returned, otherwise the byte offset of the next location of the fragment after the start position.

Remarks

Example Use
TVariable var("123");
TVariable pos = var.Position("2");//return - The value is 1
pos = var.Position(Bx00);//return - The value is 3

Since

TScript Version 1.1.0

Also See

Copy, SubString, StringReplace
 

Contact Ekky Software

All around the world Ekky Software is contactable seven days of the week by submitting the following details.

Thank you for your time and interest.
Ekky Software Customer Support Team.

Ekky Software Product Range
Ekky Software Homepage Texas Business Software ObjectDatabase++ TScript Ekky Software Homepage Texas Business Software ObjectDatabase++ TScript