docs: private static String replaceFunctionParameter(String functionString) {
  
      if (!functionString.contains("SQL_")) {
        return functionString;
      }
  
      char[] input = functionString.toCharArray();
      StringBuilder sb = new StringBuilder();
      int index;
      for (index = 0; index < input.length; index++) {
        if (input[index] != ' ') {
          break;
        }
      }
  
      for (; ((input[index] >= 'a' && index <= 'z') || (input[index] >= 'A' && input[index] <= 'Z'))
          && index < input.length; index++) {
        sb.append(input[index]);
      }
      String func = sb.toString().toLowerCase(Locale.ROOT);
  
      if ("convert".equals(func) || "timestampdiff".equals(func) || "timestampadd".equals(func)) {
        String paramPrefix;
  
        if ("timestampdiff".equals(func) || "timestampadd".equals(func)) {
          // Skip to first parameter
          for (; index < input.length; index++) {
            if (!Character.isWhitespace(input[index]) && input[index] != '(') {
              break;
            }
          }
          if (index == input.length) {
            return new String(input);
          }
  
          if (index >= input.length - 8) {
            return new String(input);
          }
          paramPrefix = new String(input, index, 8);
          if ("SQL_TSI_".equals(paramPrefix)) {
            return new String(input, 0, index) + new String(input, index + 8,
                input.length - (index + 8));
          }
          return new String(input);
        }
  
        // Handle "convert(value, type)" case
        // extract last parameter, after the last ','
        int lastCommaIndex = functionString.lastIndexOf(',');
  
        for (index = lastCommaIndex + 1; index < input.length; index++) {
          if (!Character.isWhitespace(input[index])) {
            break;
          }
        }
        if (index >= input.length - 4) {
          return new String(input);
        }
        paramPrefix = new String(input, index, 4);
        if ("SQL_".equals(paramPrefix)) {
          return new String(input, 0, index) + new String(input, index + 4,
              input.length - (index + 4));
        }
  
      }
      return new String(input);
    }