Android File Name Get getSuffix(String fileName)

Here you can find the source of getSuffix(String fileName)

Description

get Suffix

Declaration

public static String getSuffix(String fileName) 

Method Source Code

//package com.java2s;

import android.text.TextUtils;

public class Main {

    public static String getSuffix(String fileName) {
        if (!TextUtils.isEmpty(fileName) && fileName.contains(".")) {
            return fileName.substring(fileName.lastIndexOf(".") + 1);
        }/*from  w ww  .  j  a v a  2  s  . com*/
        return "";
    }
}

Related

  1. getFileName(String filePath)
  2. getFileName(String path)
  3. getRandomFileName(String prefix, String suffix)
  4. parseFileName(String path)
  5. getSuffix(File file)
  6. getNamePart(String fileName)
  7. appendNumberToFilenameIfExists(String fileName, File directory)
  8. getUniqueImageFilename(String prefix)
  9. getFileName()