substring

The substring method extracts the characters from a string between two specified indices.

 

Syntax

System.String substring(System.Int32 start, System.Int32 end);

 

Parameters

start

he position where to start the extraction. First character is at index 0

end

[Optional] The position where to end the extraction. Default end of the string.

 

Return Value

Returns the extracted string

 

Remarks

Member of string.

 

Example