Home > Language Reference > Classes > StringMatcher

SetPattern Method

Sets the search pattern.

Syntax

Public Sub SetPattern(ByRef sPattern As String, ByVal bCase As Boolean, ByVal bAccent As Boolean, ByVal bMatchWord As Boolean)

ParameterDescription
sPatternSearch pattern.
bCaseIndicates if the search is case sensitive.
bAccentIndicates if the search takes accented characters into account.
bMatchWordIndicates if only complete words are recognized.

Remarks

The SetPattern method sets the pattern used by the StringMatcher object. The previous search pattern used in the last call to this method or the SetRegExp method is lost, and replaced by the new one.

The sPattern parameter specifies the string to find. This can contain any character and is used as is. If you need to specify wildcards, use the SetRegExp method to set the pattern instead.

The bCase parameter specifies whether the search should be case sensitive. For example, if this parameter is set to False, the characters "A" and "a" are considered to be the same.

The bAccent parameter specifies whether the search should distinguish between accented and non accented characters. For example, if this parameter is set to False, the characters "a" and "à" are considered to be the same.

The bMatchWord parameter specifies whether the search should recognize a whole word, that is to say surrounded by spaces or punctuation marks.

The StringMatcher introduction page gives a full example of this object and its methods.

System requirements

SystemMinimal versionRemarks
Palm OSPalm OS 3.0N/A