Java File Name Create toFilename(String str)

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

Description

to Filename

License

Open Source License

Declaration

public static String toFilename(String str) 

Method Source Code

//package com.java2s;

public class Main {
    public static String toFilename(String str) {
        return str.replaceAll("\\s", "_").replaceAll(":", "_");
    }/* w  w  w.j a va  2s .  com*/
}

Related

  1. toFilename(String key, final String suffix)
  2. toFileName(String moduleName)
  3. toFilename(String name, String extension)
  4. toFilename(String s)
  5. toFileName(String s)
  6. toFileName(String str)