net.twonky
Class StringExtract
java.lang.Object
net.twonky.StringExtract
public class StringExtract
- extends Object
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StringExtract
public StringExtract()
basename
public static String basename(String filename)
- Returns the basename of a filename or an URL.
Note: "/" as input will result in an empty string "" being
returned. This is contrary to usual POSIX standard.
- Parameters:
filename - a filename or an URL.
- Returns:
- the basename of the filename.
dirname
public static String dirname(String filename)
- Returns the dirname of a filename or url.
Note: the returned dirname will contain and ending file
separator character ("/" on Unix and "\" on Windows). This
contrary to usual POSIX standard.
- Parameters:
filename - a filename or an URL.
- Returns:
- the dirname of the filename.
Copyright © 2012. All Rights Reserved.