Package de.kosmos_lab.utils
Class Wildcard
- java.lang.Object
-
- de.kosmos_lab.utils.Wildcard
-
public class Wildcard extends Object
this class is used to parse
-
-
Constructor Summary
Constructors Constructor Description Wildcard()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanmatches(String pattern, String text)matches a string to pattern where * can be 0-n unknown characters and ? can be exactly 1 character
-
-
-
Method Detail
-
matches
public static boolean matches(@Nonnull String pattern, @Nonnull String text)matches a string to pattern where * can be 0-n unknown characters and ? can be exactly 1 characterWildcard.matches("Te?t","Test") -> true Wildcard.matches("Te?t","Tesst") -> false Wildcard.matches("Te*t","Tesst") -> true Wildcard.matches("Te*t","Test") -> true Wildcard.matches("Tet","Test") -> true- Parameters:
pattern- the pattern to usetext- the text to match against- Returns:
-
-