All Downloads are FREE. Search and download functionalities are using the official Maven repository.

tgtools.tasklibrary.util.FileUtil Maven / Gradle / Ivy

There is a newer version: 0.1.12
Show newest version
package tgtools.tasklibrary.util;

import tgtools.util.StringUtil;

/**
 * Created by tian_ on 2016-08-23.
 */
public class FileUtil {
    public static String getFileExt(String p_FileName)
    {
        if(!StringUtil.isNullOrEmpty(p_FileName))
        {
           int index= p_FileName.lastIndexOf(".");
            if(p_FileName.length()>index+1)
            {
                return p_FileName.substring(index+1);
            }
        }
        return StringUtil.EMPTY_STRING;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy