Java String Clean cleanStringFromWhitespaces(String text)

Here you can find the source of cleanStringFromWhitespaces(String text)

Description

clean String From Whitespaces

License

Open Source License

Parameter

Parameter Description
text a parameter

Declaration

public static String cleanStringFromWhitespaces(String text) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /**// w w w .java 2  s .c o m
     * 
     * @param text
     * @return
     */
    public static String cleanStringFromWhitespaces(String text) {
        return text.replaceAll(" ", " ").trim();
    }
}

Related

  1. cleanStringByLikeWithHSQL(String input)
  2. cleanStringCamelCase(String in)
  3. cleanStringForFilename(String originalString)
  4. cleanStringForFilePath(final String dirty)
  5. cleanStringForJavaName(String original)
  6. cleanText(final String input)
  7. cleanText(String s)
  8. cleanText(String s)
  9. cleanText(String t)