code: public static void insert (@Nonnull final CharSequence aSeq, final int nIndex, final int nCodepoint)
    {
      if (!(aSeq instanceof StringBuilder))
      {
        insert (new StringBuilder (aSeq), nIndex, nCodepoint);
      }
      else
      {
        int nI = nIndex;
        if (nI > 0 && nI < aSeq.length ())
        {
          final char ch = aSeq.charAt (nI);
          final boolean low = Character.isLowSurrogate (ch);
          if (low && Character.isHighSurrogate (aSeq.charAt (nI - 1)))
          {
            nI--;
          }
        }
        ((StringBuilder) aSeq).insert (nI, Character.toChars (nCodepoint));
      }
    }
docs: Insert a codepoint into the buffer, automatically dealing with surrogate
  pairs
  
  @param aSeq
  source sequence
  @param nIndex
  index
  @param nCodepoint
  codepoint to be inserted