Java File Name Clean cleanFilename(String filename)

Here you can find the source of cleanFilename(String filename)

Description

clean Filename

License

Open Source License

Declaration

public static String cleanFilename(String filename) 

Method Source Code

//package com.java2s;

public class Main {
    public static String cleanFilename(String filename) {
        filename = filename.toLowerCase();
        filename.replaceAll("/[ _a-z0-9^]/", "");
        filename.replaceAll(" ", "_");

        return filename;
    }//from  w w w  .  j a  va2  s.  c o m
}

Related

  1. cleanFileName(final String value)
  2. cleanFileName(String arg)
  3. cleanFileName(String badFileName)
  4. cleanFilename(String filename)
  5. cleanFileName(String filename)
  6. cleanFileName(String name)
  7. cleanFileName(String name)
  8. cleanFileName(String path)
  9. cleanFileName(String s)