Topic Path: Symbol Reference > Functions > TrimAllOf Function
ContentsIndexHome
PreviousUpNext
TrimAllOf Function

Removes leading and trailing occurrences of the specified characters.

File
function TrimAllOf(
    ATrim: String; 
    AText: String
): String;
Parameters 
Description 
ATrim 
Character values to be removed.
 
AText 
Text to be trimmed. 

String - Values after removing the specified characters.

TrimAllOf is a String function that remove all occurrences of character values in ATrim from the beginning and end of the values specified in AText. TrimAllOf is like SysUtils.Trim, but acts upon the characters specified in ATrim instead of the default space character. 

The return value for TrimAllOf is the values in AText after removing all leading and trailing occurrences of the characters in ATrim.

  sData := TrimAllOf(':[]=', ':[c:tempfilename.ext===]');
  // sData contains 'c:tempfilename.ext'
Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.