Formatted UnicodeLetterChecker.java
This commit is contained in:
parent
e99ce4da19
commit
dfd9baf8e0
@ -13,15 +13,18 @@ public class UnicodeLetterChecker {
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean regexCheck(String input) {
|
public boolean regexCheck(String input) {
|
||||||
Pattern pattern = Pattern.compile("^\\p{L}+$");
|
Pattern pattern = Pattern.compile("^\\p{L}+$");
|
||||||
Matcher matcher = pattern.matcher(input);
|
Matcher matcher = pattern.matcher(input);
|
||||||
return matcher.matches();
|
return matcher.matches();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isAlphaCheck(String input) {
|
public boolean isAlphaCheck(String input) {
|
||||||
return StringUtils.isAlpha(input);
|
return StringUtils.isAlpha(input);
|
||||||
}
|
}
|
||||||
public boolean StreamsCheck(String input){
|
|
||||||
|
public boolean StreamsCheck(String input) {
|
||||||
return input.codePoints().allMatch(Character::isLetter);
|
return input.codePoints().allMatch(Character::isLetter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user