code: public MessageBuilder replaceLast(String target, String replacement)
      {
          int index = builder.lastIndexOf(target);
          if (index != -1)
          {
              builder.replace(index, index + target.length(), replacement);
          }
          return this;
      }
docs: Replaces the last substring that matches the target string with the specified replacement string.
  
  @param  target
  the sequence of char values to be replaced
  @param  replacement
  the replacement sequence of char values
  
  @return The MessageBuilder instance. Useful for chaining.