Here you can find the source of cleanText(String text)
Parameter | Description |
---|---|
text | input text |
public static String cleanText(String text)
//package com.java2s; //License from project: Open Source License public class Main { /**/*from w ww . jav a 2s. co m*/ * removes some non-standard characters from a string * @param text input text * @return cleaned text */ public static String cleanText(String text) { if (text != null) { text = text.replaceAll("&", "&"); text = text.replaceAll("_", " "); text = text.replaceAll(" ", " "); } return text; } }