Java File Base Name Get basename(String s)

Here you can find the source of basename(String s)

Description

basename

License

Open Source License

Declaration

public static String basename(String s) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static String basename(String s) {
        int dot = s.lastIndexOf('.');
        return s.substring(0, dot);
    }/*  w w w  . j a  v  a2s  .com*/
}

Related

  1. basename(String path)
  2. basename(String path)
  3. basename(String path)
  4. baseName(String path)
  5. basename(String path, char separator)
  6. basename(String s)
  7. basenamePart(String className)