code: public int replace(String text) {
          int delta=text.length()-(cpLimit-cpStart);
          rep.replace(cpStart, cpLimit, text);
          cpLimit+=delta;
          limit+=delta;
          contextLimit+=delta;
          return delta;
      }
docs: Replace the current code point by its case mapping,
  and update the indexes.
  
  @param text Replacement text.
  @return The delta for the change of the text length.