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

Method openURLIfFound

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

Opens an URL if one has been found in given input String. @param input The input String that should be matched to the URL-Regex.

(String input)

Source from the content-addressed store, hash-verified

438 * @param input The input String that should be matched to the URL-Regex.
439 */
440 public static void openURLIfFound(String input) {
441 List<String> matchedURLs = matchURL(input);
442 if (matchedURLs.isEmpty())
443 return;
444 for (String matchedURL : matchedURLs) {
445 openURL(matchedURL);
446 }
447 }
448
449 /**
450 * Returns a List with all URLs that could been matched from given input String.

Callers 3

chatLineClickedMethod · 0.95
chatLineClickedMethod · 0.95
chatLineClickedMethod · 0.95

Calls 3

matchURLMethod · 0.95
openURLMethod · 0.95
isEmptyMethod · 0.80

Tested by

no test coverage detected