Unit 'StrUtils' Package
[Overview][Resource strings][Constants][Types][Procedures and functions][Index] [#rtl]

RemoveTrailingChars

Remove any trailing characters in a set from a string.

Declaration

Source position: strutils.pp line 272

procedure RemoveTrailingChars(

  var S: AnsiString;

  const CSet: TSysCharSet

);

procedure RemoveTrailingChars(

  var S: UnicodeString;

  const CSet: TSysCharSet

);

Description

RemoveTrailingChars removes any trailing characters from S that appear in the set CSet, i.e. it starts with the last character and works its way to the start of the string. It stops removing characters as soon as a character not in CSet is encountered. This is similar in behaviour to TrimRight which used whitespace as the set.

See also

TrimRight

  

Trim whitespace from the beginning of a string.

RemoveLeadingChars

  

Remove any leading characters in a set from a string.

TrimRightSet

  

Remove any trailing characters in a set from a string and returns the result.


Documentation generated on: Nov 23 2024