public static String insert(String src,String insert,int offset){
  if (offset < 0) {
    offset=0;
  }
  if (offset > src.length()) {
    offset=src.length();
  }
  StringBuilder sb=new StringBuilder(src);
  sb.insert(offset,insert);
  return sb.toString();
}

public static String insert ( String src , String insert , int offset ) { if ( offset < 0 ) { offset = 0 ; } if ( offset > src . length ( ) ) { offset = src . length ( ) ; } StringBuilder sb = new StringBuilder ( src ) ; sb . insert ( offset , insert ) ; return sb . toString ( ) ; }
inserts a string on provided offset .
