Java String Remove removeNewLineAndTab(String value)

Here you can find the source of removeNewLineAndTab(String value)

Description

If there exists reserved characters in value, remove them all.

License

Apache License

Parameter

Parameter Description
value The Value of the MzTab Term

Return

Return a value without tab

Declaration

public static String removeNewLineAndTab(String value) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.ArrayList;
import java.util.List;

public class Main {
    /**/*from   w w w.  java 2s.com*/
     * If there exists reserved characters in value, remove them all.
     *
     * @param value The Value of the MzTab Term
     * @return Return a value without tab
     */
    public static String removeNewLineAndTab(String value) {
        if (value != null) {
            value = value.trim();

            // define a reserved character list.
            List<String> reserveCharList = new ArrayList<String>();

            reserveCharList.add("\n");
            reserveCharList.add("\t");

            for (String c : reserveCharList) {
                value = value.replaceAll(c, " ");
            }
        }

        return value;
    }
}

Related

  1. removeGenericQuote(String str)
  2. removeIllegalXMLChars(String in)
  3. removeImportClass(String className)
  4. removeKeyPrefix(Properties properties, String prefix)
  5. removeModuleReference(String allStr, String refStr)
  6. removePostfixedNewline(String s)
  7. removeProperty(String name)
  8. removePropertyNameModifier(String name)
  9. removePunctuation(String str)