/** * @since 3.0 */ public static boolean isUrl(String token) { for (String protocol : WordTokenizer.getProtocols()) { if (token.startsWith(protocol + "://") || token.startsWith("www.")) { return true; } } return NO_PROTOCOL_URL.matcher(token).matches(); }
/** * @since 3.0 */ public static boolean isUrl(String token) { for (String protocol : WordTokenizer.getProtocols()) { if (token.startsWith(protocol + "://") || token.startsWith("www.")) { return true; } } return false; }