Java String Quote quoteEscaped(String input)

Here you can find the source of quoteEscaped(String input)

Description

quote Escaped

License

Apache License

Declaration

public static String quoteEscaped(String input) 

Method Source Code

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

public class Main {
    public static String quoteEscaped(String input) {
        return input.replace("\\", "\\\\").replace("\"", "\\\"").replaceAll("[\\p{Z}\\s]", " ").trim();
    }/*from w ww . j ava2 s  . c  o  m*/
}

Related

  1. quotedString(String string)
  2. quotedString(String text)
  3. quotedStringOrNull(String string)
  4. quoteEach(String string)
  5. quoteEscape(final String original)
  6. quoteExecutable(String executable)
  7. quoteFileName(String filename)
  8. quoteForBatchScript(String arg)
  9. quoteForCommandString(String s)