Phantom Documentation

[Help Home] [Phantom Home]
SubString

string SubString(string,int,int)

Return Type: string
Parameters: string s, int iBegin, int iEnd

Description:
This function extracts characters from a string and puts them into a new string. The characters extracted are the characters between iBegin and iEnd indices, inclusive. Note that the indices are zero-based. The original string is not modified.

Example Code
1 >>string s = "See Spot run";
2 >>disp(SubString(s, 4, 7));
Spot


 


Copyright 2000-2011 Phantom Automated Solutions