Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.text.TextUtils;

public class Main {

    public static String getUriName(String uri) {
        if (!TextUtils.isEmpty(uri)) {
            if (uri.contains("/")) {
                int index = uri.lastIndexOf("/");
                if (index < uri.length() - 2) {
                    uri = uri.substring(index + 1, uri.length());
                }
            }
        }
        return uri;
    }
}