private static String replaceLast(String sourceString, String toBeReplaced, String replacement)
  {
    StringBuilder x = new StringBuilder(sourceString);  
    int liof = x.lastIndexOf(toBeReplaced);

    if(liof >= 0)
      x.replace(liof, liof+4, replacement);

    return new String(x);
  }
private static String replaceLast ( String sourceString , String toBeReplaced , String replacement ) { StringBuilder x = new StringBuilder ( sourceString ) ; int liof = x . lastIndexOf ( toBeReplaced ) ; if ( liof >= 0 ) x . replace ( liof , liof + 4 , replacement ) ; return new String ( x ) ; }
######################