string class : Remove(int) method

Description

Gets a new instance of the string that have been removed from the specified position to the end.

Syntax

stringInstance.Remove(int startPosition)

Arguments

ClassNameDescription
intstartPositionA start position of removing.

Return value

ClassDescription
stringA new instance of the string that have been removed from the specified position to the end

Sample code

//anyString is a instance of string type.

string removedString = anyString.Remove(5);

Notes

Position is specified by the index. The index is zero-based.

Links for reference

None

Copyright © Rice All rights reserved.