Class WildcardMatch

java.lang.Object
com.hypixel.hytale.server.core.util.WildcardMatch

public final class WildcardMatch extends Object
  • Method Details

    • test

      public static boolean test(String text, String pattern)
    • test

      public static boolean test(String text, String pattern, boolean ignoreCase)
      Tests if a string matches a wildcard pattern. Pattern suports * for multichars and ? for single chars. Examples: - AnnualReport_*.pdf - *.txt - log-201?-*.csv
      Parameters:
      text - The text being tested
      pattern - The wildcard pattern
      ignoreCase -
      Returns:
      true if the text fits the pattern