JCL Help:StrRemoveChars@AnsiString@TSysCharSet

From Project JEDI Wiki
Jump to navigationJump to search


Summary

Removes a set of characters from a string.


Pascal

 function StrRemoveChars(const S: string; const Chars: TCharValidator): string; overload;
function StrRemoveChars(const S: string; const Chars: array of Char): string; overload;
function StrRemoveChars(const S: AnsiString; const Chars: TSysCharSet): AnsiString;


Parameters

Parameters Description
const S: string The source string from which to remove the characters.
const Chars: TCharValidator The set of characters which are removed from S.


Return Value

The string with all characters from the supplied set removed.


Description

StrRemoveChars removes all instances of the characters in the set from the source string. For example, if you pass in 'Joint Endeavour of Delphi Innovators' and specify ['e', 'a', 'o', 'u', 'i'] the resulting string will be 'Jnt Endvr f Dlph Innvtrs'.


About

Unit

JclAnsiStrings


Donator

Marcel van Brakel


Notes

The function is case sensitive. That is, specifying 'e' will not remove 'E'.


Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page