docs: public static String replace(String inString, String oldPattern, String newPattern) {
          if (isEmpty(inString) || isEmpty(oldPattern) || newPattern == null) {
              return inString;
          }
          StringBuilder sbuf = new StringBuilder();
          // output StringBuilder we'll build up
          int pos = 0; // our position in the old string
          int index = inString.indexOf(oldPattern);
          // the index of an occurrence we've found, or -1
          int patLen = oldPattern.length();
          while (index >= 0) {
              sbuf.append(inString.substring(pos, index));
              sbuf.append(newPattern);
              pos = index + patLen;
              index = inString.indexOf(oldPattern, pos);
          }
          sbuf.append(inString.substring(pos));
          // remember to append any characters to the right of a match
          return sbuf.toString();
      }