code: public CharSequence format() {
      if (pieces.isEmpty()) {
        return input;
      }
  
      String target;
  
      for (Piece piece : pieces) {
        target = BRACE_START + piece.getKey() + BRACE_END;
        input = input.replace(target, String.valueOf(piece.getValue()));
      }
  
      return input;
    }
docs: Returns formatted CharSequence without additional operations
  
  @return formatted CharSequence