Description
Takes a portion of the source string stringArgument with a defined beginning (start) and length (numChars).
Timing Precision Mode
This page describes functionality in millisecond timing precision mode.
Function Signature
Arguments
stringArgument
|
|
Description:
|
The source string from which a substring will be extracted.
|
start
|
|
Description:
|
The index of the first character from which to begin the extraction (zero based).
|
Valid Range:
|
start ≥ 0
|
numChars
|
|
Description:
|
The number of characters to extract from the source string.
|
Valid Range:
|
numChars ≥ 0
|
Return Value
Return a substring of a string.
Syntax
myString1 = SubString(myString2, myVariable1, myVariable2);
|
The following example extracts portions of the String str1 by specifying start and end positions.
String str1 = "abcdefghijk";
String str2;
String str3;
str2 = SubString(str1, 3, 4);
str3 = SubString(str1, 1, 6);
Report str1, str2, str3;
|
Output:
str1
|
abcdefghijk
|
str2
|
defg
|
str3
|
bcdefg
|
|
See also
SubString
|