Checks a character in a string for membership in a set of characters.
function CharIsInSet( const AString: string; const ACharPos: Integer; const ASet: String ): Boolean;
Parameters |
Description |
AString |
Characters to check. |
ACharPos |
Position of the character to check. |
ASet |
Set of characters for comparision. |
Boolean - True when the specified character is one of the specified set of characters.
CharIsInSet is a Boolean function used to determine if the character in AString at the position indicated by ACharPos is a member of the set of characters specified in ASet. CharIsInSet returns True when the specified character is a member of the specified set of characters.
Values in ACharPos should be in the range 1 through the length of the string specified in AString. If ACharPos is larger than the length of AString, the return value is False. If ACharPos is less than 1, an EIdException is raised to indicate an invalid character position has been specified.
CharIsInSet calls IndyPos to check for the specified character in ASet, and returns True when the position is a non-zero value.
Exceptions |
Description |
raised with the message 'Invalid ACharPos in CharIsInSet' when an invalid character position is specified (< 1). |
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
|
Post feedback to the Indy Docs Newsgroup.
|