code: public static String replace(final String text, final String searchString, final String replacement, final int max) {
          return replace(text, searchString, replacement, max, false);
      }
docs: <p>Replaces a String with another String inside a larger String,
  for the first {@code max} values of the search String.</p>
  
  <p>A {@code null} reference passed to this method is a no-op.</p>
  
  <pre>
  StringUtils.replace(null, *, *, *)         = null
  StringUtils.replace("", *, *, *)           = ""
  StringUtils.replace("any", null, *, *)     = "any"
  StringUtils.replace("any", *, null, *)     = "any"
  StringUtils.replace("any", "", *, *)       = "any"
  StringUtils.replace("any", *, *, 0)        = "any"
  StringUtils.replace("abaa", "a", null, -1) = "abaa"
  StringUtils.replace("abaa", "a", "", -1)   = "b"
  StringUtils.replace("abaa", "a", "z", 0)   = "abaa"
  StringUtils.replace("abaa", "a", "z", 1)   = "zbaa"
  StringUtils.replace("abaa", "a", "z", 2)   = "zbza"
  StringUtils.replace("abaa", "a", "z", -1)  = "zbzz"
  </pre>
  
  @param text  text to search and replace in, may be null
  @param searchString  the String to search for, may be null
  @param replacement  the String to replace it with, may be null
  @param max  maximum number of values to replace, or {@code -1} if no maximum
  @return the text with any replacements processed,
  {@code null} if null String input