//ERDDAP/com.cohort.util/ScriptString2/modifyToBeFileNameSafe
modifyToBeFileNameSafe
[JVM]
open fun modifyToBeFileNameSafe(s: String): String
This returns the string with just file-name-safe characters (0-9, A-Z, a-z, , -, .). This is different from String2.encodeFileNameSafe -- this emphasizes readability, not avoiding losing information. Non-safe characters are converted to ''. Adjacent '' are collapsed into ''. See posix fully portable file names at https://en.wikipedia.org/wiki/Filename . See javadocs for java.net.URLEncoder, which describes valid characters (but deals with encoding, whereas this method alters or removes). The result may be shorter than s. Note, this does not check for filenames that are too long (Windows has a path+fileName max length of 255 chars).