JCL Help:StrContainsChars@AnsiString@TSysCharSet@Boolean

From Project JEDI Wiki
Jump to navigationJump to search


Summary

Determines whether a string contains a specified set of characters.


Pascal

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


Parameters

Parameters Description
const S: string The string to test.
const Chars: TCharValidator The characters for which to test.
CheckAll: Boolean If True, all characters from Chars must appear at least once in the specified string. If False, at least one of the characters in Chars must appear at least once in the specified string.


Return Value

Returns True if the condition is met, otherwise it returns False.


Description

StrContainsChars checks whether the specified string contains at least one character that matches one of the characters in the Chars set. If CheckAll is True, the function checks whether all characters in the Chars set appear at least once in the specified string.


About

Unit

JclAnsiStrings


Donator

Petr Vones


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