slice

The slice method extracts a part of a string and it returns a new string.

 

Syntax

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

 

Parameters

start

The position where to begin the extraction. First character is at position 0.

end

[Optional] The position where to end extraction (not inclusive).

 

Return Value

Returns the extracted string

 

Remarks

Member of string.

 

Example