Last active
February 23, 2020 20:35
-
-
Save rnaufal/ea6d58f6a609305e3835f2d9cf2fade7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final var totalDigits = string.chars() | |
.filter(Character::isDigit) | |
.count(); | |
final var totalUppercaseChars = string.chars() | |
.filter(Character::isUpperCase) | |
.count(); | |
final var totalLowercaseChars = string.chars() | |
.filter(Character::isLowerCase) | |
.count(); | |
final var totalInvalidChars = string.chars() | |
.filter(character -> !Character.isLetterOrDigit(character)) | |
.count(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment