String class

remove()

The String remove() function modifies a string, in place, removing chars from the provided index to the end of the string or from the provided index to index plus count. This modifies the object, not a copy.

// SYNTAX
string.remove(index)
string.remove(index,count)

// PROTOTYPES
String& remove(unsigned int index);
String& remove(unsigned int index, unsigned int count);

Parameters:

  • string: the string which will be modified - a variable of type String
  • index: a variable of type unsigned int
  • count: a variable of type unsigned int

Returns: A reference to the String object (*this).