Android examples for java.lang:String Starts or Ends
replace Suffix
public class Main{ public static String replaceSuffix(String base, String target, String replacement) { return base.substring(0, base.lastIndexOf(target)) + replacement; }/*from w w w .j ava2s . co m*/ }