Java Code Examples for android.text.TextUtils.lastIndexOf()

The following are Jave code examples for showing how to use lastIndexOf() of the android.text.TextUtils class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: chromium-for-android-56-debug-video   File: MediaImageManager.java   View Source Code Vote up 4 votes
private String getExtension(String url) {
    int index = TextUtils.lastIndexOf(url, '.');
    if (index == -1) return "";
    return url.substring(index + 1).toLowerCase(Locale.US);
}