Package org.eclipse.ui.actions
Class SimpleWildcardTester
java.lang.Object
org.eclipse.ui.actions.SimpleWildcardTester
Implements an algorithm for very simple pattern matching in a string. There
is only one feature: "*" may be used at the start or the end of the pattern
to represent "one or more characters".
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
testWildcard
(String pattern, String str) Returns whether a string matches a particular pattern.static boolean
testWildcardIgnoreCase
(String pattern, String str) Returns whether a string matches a particular pattern.
-
Constructor Details
-
SimpleWildcardTester
public SimpleWildcardTester()
-
-
Method Details
-
testWildcard
Returns whether a string matches a particular pattern.- Parameters:
pattern
- the input patternstr
- the string to test- Returns:
true
if a match occurs;false
otherwise.
-
testWildcardIgnoreCase
Returns whether a string matches a particular pattern. Both string and pattern are converted to lower case before pattern matching occurs.- Parameters:
pattern
- the input patternstr
- the string to test- Returns:
true
if a match occurs;false
otherwise.
-