Indy 9 | Content | Index | Reference

FindFirstOf
See Also, Example, Unit: IdStrings
Locates the position where any of the characters in a search string occur in a string value.

    function FindFirstOf(AFind: String; AText: String): Integer;

Unit
IdStrings
Parameters
AFind: String
Values to be compared.
AText: String
Data to searched.
Return Value
Integer - Position where a search string character was located.
Description
FindFirstOf is an Integer function that locates the position in AText where any one of the characters in AFind can be found. FindFirstOf will iteratively search for each character in AFind until all characters in AFind have compared to AText. The return value will contain the lowest index position for any of the characters in AFind, or 0 when none of the characters in AFind occur in AText.

Created with Doc-O-Matic 2 donated to Project JEDI. Commercial license available from the Doc-O-Matic site.