Here you can find the source of getNameAppendStr(String path, String Str)
public static String getNameAppendStr(String path, String Str)
//package com.java2s; public class Main { public static String getNameAppendStr(String path, String Str) { int i = path.lastIndexOf("."); if (i == -1 || i == 0) return path + Str; return path.substring(0, i) + Str + path.substring(i, path.length()); }/*from w w w .j a va 2 s. c o m*/ }