docs: public static String replaceAll(final String input,
              final String pattern, final String replacement) {
          final StringBuilder result = new StringBuilder();
          int startIndex = 0;
          int newIndex;
  
          while ((newIndex = input.indexOf(pattern, startIndex)) >= 0) {
              result.append(input, startIndex, newIndex);
              result.append(replacement);
              startIndex = newIndex + pattern.length();
          }
  
          result.append(input.substring(startIndex));
  
          return result.toString();
      }