|The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....|
|Home MathPack Math2 Class TStringSearch TStringSearch|
The class TStringSearch allows to search for partial strings, using boolean expressions. The string to be searched has to be assigned to the property InString, the search expression is specified by the property SearchExpression. The method DoSearch returns TRUE if the search expression matches the string assigned to InString. In this case the properties NumFoundItems, FoundItemsPos and FoundItemsLength contain the number of found matches, and the positions and the lengths of the found matches.
The search expression can be any combination of strings and the boolean operators AND, OR and NOT. The AND operator is indicated by the plus sign ('+'), the OR operator by the comma (','), and the NOT operator by the tilde ('~'). Further, expressions may contain parantheses to control the operator precendence. The sub-strings to be searched for must consist of characters (A-Z, a-z, umlauts) or numbers. The characters '+,~()' cannot be searched for since they are interpreted as operators.
The property IgnoreCase controls the case sensitivity of the search.