Android Path Sub Path Get getLastPathComponent(String filePath)

Here you can find the source of getLastPathComponent(String filePath)

Description

get Last Path Component

Declaration

public static String getLastPathComponent(String filePath) 

Method Source Code

//package com.java2s;

public class Main {
    public static String getLastPathComponent(String filePath) {
        String[] segments = filePath.split("/");
        String lastPathComponent = segments[segments.length - 1];
        return lastPathComponent;
    }/*from w  w  w  . j  a va 2  s  . c  o m*/
}

Related

  1. getSubFiles(String parentpath, String uri)
  2. getSubFiles(String parentpath, String uri, FileFilter fileFilter)
  3. hasSubFiles(String path)
  4. hasSubFiles(String path, String uri)
  5. getLastPathComponent(File file)
  6. getLastPathComponent(final String filePath)
  7. getLastPathComponent(String url)