Substring

Top  Previous  Next

Function

Parameters

Return value

Substring

string s, 

int startIndex

string

 

Retrieves a substring from the "s" string. The substring starts at a character position specified in the "startIndex" parameter.

 

Example:

 

Substring("ABCDEF", 4) = "EF"

 

 

Function

Parameters

Return value

Substring

string s, 

int startIndex,

int length

string

 

Retrieves a substring from the "s" string. The substring starts at a character position specified in the "startIndex" parameter and has a length specified in the "length" parameter.

 

Example:

 

Substring("ABCDEF", 1, 3) = "BCD"