Skip to content

Instantly share code, notes, and snippets.

@engleangs
Created May 26, 2020 09:11
Show Gist options
  • Save engleangs/09dcc69b89d20e38b2e8bbb7abbaae6d to your computer and use it in GitHub Desktop.
Save engleangs/09dcc69b89d20e38b2e8bbb7abbaae6d to your computer and use it in GitHub Desktop.
public static String cleanResult(String result){
StringBuilder sb = new StringBuilder();
for(int i =0;i<result.length();i++){
if( Character.isAlphabetic( result.charAt(i)) || Character.isDigit( result.charAt(i))) {
sb.append( result.charAt(i));
}
}
return sb.toString();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment