Java File Name Clean cleanFileName(String name)

Here you can find the source of cleanFileName(String name)

Description

clean File Name

License

Open Source License

Declaration

public static String cleanFileName(String name) 

Method Source Code

//package com.java2s;

public class Main {
    public static String cleanFileName(String name) {

        return name.substring(0, name.lastIndexOf(".")).replaceAll("[^a-zA-Z0-9]", "");
    }/*from ww  w. j a va  2 s  .c  o m*/
}

Related

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