Here you can find the source of sanitize(final String main)
Parameter | Description |
---|---|
main | a parameter |
public static String sanitize(final String main)
//package com.java2s; //License from project: Open Source License public class Main { /**// w w w . j a va 2 s. c om * Removes all chars not accepted by the file system naming scheme. * * @param main * @return */ public static String sanitize(final String main) { return main.replace("<", "").replace(">", "").replace(":", "") .replace("/", "").replace("\\", "").replace("|", "") .replace("?", "").replace("*", "").replace("\"", "") .replace("\r", "").replace("\n", ""); } }