You are viewing a single comment's thread. Return to all comments →
private static boolean checkTect(String text) { int numberOfCharacters = 26; Set<String> characters = new HashSet<>(); String regexp = "[a-zA-Z]"; Pattern pattern = Pattern.compile(regexp); Matcher matcher = pattern.matcher(text); int index = 0; boolean foundAll = false; while (matcher.find() && !foundAll) { String s = matcher.group().toLowerCase(); characters.add(s); if (characters.size() == numberOfCharacters) { foundAll = true; } index++; } return foundAll; }
Seems like cookies are disabled on this browser, please enable them to open this website
Pangrams
You are viewing a single comment's thread. Return to all comments →