Java String Sanitize sanitize(String original)

Here you can find the source of sanitize(String original)

Description

sanitize

License

Apache License

Declaration

public static String sanitize(String original) 

Method Source Code

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

public class Main {
    public static final String SANITIZED_FLAG = "[SANITIZED]";

    public static String sanitize(String original) {
        String cleaned = original.replace("\r", "|").replace("\n", "|").replace("\t", "|");

        if (!cleaned.equals(original)) {
            cleaned += SANITIZED_FLAG;/*from   w  w w.  j  av a 2 s. com*/
        }

        return cleaned;
    }
}

Related

  1. sanitize(String input)
  2. sanitize(String input)
  3. sanitize(String input, String prohibitedStringsRegexp)
  4. sanitize(String methodHeader)
  5. sanitize(String mimeType)
  6. sanitize(String path)
  7. sanitize(String s)
  8. sanitize(String s)
  9. sanitize(String s)