code: public static String replace(final String str, final int fromIndex, final String target, final String replacement, int max) {
          return replace(str, fromIndex, target, 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>
  replace(null, *, *, *)         = null
  replace("", *, *, *)           = ""
  replace("any", null, *, *)     = "any"
  replace("any", "", *, *)       = "any"
  replace("any", *, *, 0)        = "any"
  replace("abaa", 0, "a", null, -1) = "abaa"
  replace("abaa", 0, "a", "", -1)   = "b"
  replace("abaa", 0, "a", "z", 0)   = "abaa"
  replace("abaa", 0, "a", "z", 1)   = "zbaa"
  replace("abaa", 0, "a", "z", 2)   = "zbza"
  replace("abaa", 0, "a", "z", -1)  = "zbzz"
  </pre>
  
  @param str
  text to search and replace in, may be null
  @param fromIndex
  @param target
  the String to search for, may be null
  @param replacement
  the String to replace it with, can't 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