Java String Substritute substituteTabsAndNewLinesWithSpaces(String str)

Here you can find the source of substituteTabsAndNewLinesWithSpaces(String str)

Description

substitute Tabs And New Lines With Spaces

License

Open Source License

Declaration

public static String substituteTabsAndNewLinesWithSpaces(String str) 

Method Source Code

//package com.java2s;

public class Main {
    public static String substituteTabsAndNewLinesWithSpaces(String str) {
        return str.replaceAll("\\t", " ").replaceAll("\\n", " ");
    }/*from   w  w  w .  j  a  va  2  s. c o m*/
}

Related

  1. substituteSelectedCharacters(String text, boolean skip)
  2. substituteSpaces(String originalPath)
  3. substituteSubString(String input, String find, String replace)
  4. substituteSymbol(String text, String symbol, String value)
  5. substituteSymbol(String text, String symbol, String value)
  6. substituteText(String text, String token, String substitute)
  7. substituteToken(StringBuffer buf, String token, String value)
  8. substituteUserId(final long aUserId, final String aTemplate)
  9. substituteVars(String text, char[] names, Object[] values)