Get File Name With Extension
class Main {
public static String getFileNameWithExtension(String _path,
String _pathSeperator) {
if (_path != null) {
int sepPos = _path.lastIndexOf(_pathSeperator);
return _path.substring(sepPos + 1);
}
return "";
}
}
Related examples in the same category