public static String getPicSuffix(String img){
if (img_path == null || img_path.indexOf(".") == -1){return ""; //如果图片地址为null或者地址中没有"."就返回""
}
return img_path.substring(0,img_path.lastIndexOf(".")).
trim().toLowerCase();
}
//红色字体是你的字符串,可以根据需求截取调用
//String img = "健身.jpg";
//截取后为 "健身"