Note: The first character in str is denoted by a value of 0 (not 1). If this is greater than the string length, it throws out_of_range. Parameters pos Position of the first character to be erased. (3) range Erases the sequence of characters in the range [first,last). (2) character Erases the character pointed by p. Notice that the default argument erases all characters in the string (like member function clear).
(1) sequence Erases the portion of the string value that begins at the character position pos and spans len characters (or until the end of the string, if either the content is too short or if len is string::npos. Erases part of the string, reducing its length: