Remove range of characters |
![]() |
|
|
|
|
|
Removes the first count characters from the string. If count is greater than the string length, the string is emptied completely. For convenience, returns a reference to self.
Example:
Str r (_T("AlpHAbet"));
r.DeleteLeft(1);
printf("%s\n", (const STRCHAR*) r); // Will print lpHAbet
r.DeleteRight(2);
printf("%s\n", (const STRCHAR*) r); // Will print lpHAb
r.Delete(2, 2);
printf("%s\n", (const STRCHAR*) r); // Will print lpb
|
|
|
|
|
Removes the last count characters from the string. If count is greater than the string length, the string is emptied completely. For convenience, returns a reference to self.
See DeleteLeft for example.
|
|
|
|
|
Removes count characters starting at 0-based position start. If count is greater than the number of characters remaining from start to the end of the string, the string is truncated at position start. For convenience, returns a reference to self.
See DeleteLeft for example.
See also: Trimming / case / miscellaneous