Created
February 4, 2021 14:50
-
-
Save diogoalexsmachado/b8acb41e0dffdc4c743aa8e028a9b0ca to your computer and use it in GitHub Desktop.
remove chars string in java
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
String nome= userDao.getNomeCompleto(2L); | |
String nomeFiltered=""; | |
for (int i=0;i<str.length();i++) { | |
//only allows letters from ASCII value | |
if (str.charAt(i)>64 && str.charAt(i)<=122) { | |
nomeFiltered=nomeFiltered+str.charAt(i); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment