code: private static String insertChar(String s, int index, char c)
      {
          return new StringBuilder().append(s.substring(0, index))
                  .append(c)
                  .append(s.substring(index))
                  .toString();
      }
docs: Inserts a character at a given position within a <code>String</code>.
  
  @param s the <code>String</code> in which the character must be inserted
  @param index the position where the character must be inserted
  @param c the character to insert
  @return the modified <code>String</code>