How to remove Whitespaces from String
String removeWhiteSpaces(String input){
StringBuilder output = new StringBuilder(); char[] charArray = input.toCharArray(); for(char c : charArray) { if (!Character.isWhitespace(c)) output.append(c); } return output.toString(); }
Comments
Post a Comment