MCPcopy Create free account
hub / github.com/5zig/The-5zig-Mod / matches

Method matches

Utils/src/eu/the5zig/util/Utils.java:471–477  ·  view source on GitHub ↗

Tries to match the message with the match string. Use in match string will match any characters. Use ? will match a single character. @param message The message that should be checked. @param match The pattern. @return true, if the Pattern matches the message.

(String message, String match)

Source from the content-addressed store, hash-verified

469 * @return {@code true}, if the Pattern matches the message.
470 */
471 public static boolean matches(String message, String match) {
472 message = message.toLowerCase(Locale.ROOT);
473 Pattern pattern = compileMatchPattern(match);
474 Matcher matcher = pattern.matcher(message);
475
476 return matcher.matches();
477 }
478
479 /**
480 * Tries to match the message with the match string. Use * in match string will match any characters. Use ? will match a single character.

Callers

nothing calls this directly

Calls 1

compileMatchPatternMethod · 0.95

Tested by

no test coverage detected