code: protected String replace(String template, String placeholder, String value)
      {
          if (template == null)
              return null;
          if ((placeholder == null) || (value == null))
              return template;
  
          while (true) {
              int index = template.indexOf(placeholder);
              if (index < 0)
                  break;
              InternalStringBuilder temp = new InternalStringBuilder(template.substring(0, index));
              temp.append(value);
              temp.append(template.substring(index + placeholder.length()));
              template = temp.toString();
          }
          return template;
      }
docs: Replace any occurrence of the specified placeholder in the specified
  template string with the specified replacement value.
  @param template    Pattern string possibly containing the placeholder
  @param placeholder Placeholder expression to be replaced
  @param value       Replacement value for the placeholder