StringUtil.java 428 Bytes
package com.viontech.utils;

import org.apache.commons.lang3.StringUtils;

/**
 * @author zxk
 **/
public class StringUtil {

    /**
     * 截取文件名中的路径,只保留文件名
     * @param filename -
     */
    public static String subFileName(String filename){
        int i = filename.lastIndexOf("/");
        filename = StringUtils.substring(filename,i+1,filename.length());
        return filename;
    }

}