docs: private static boolean subArraysEqual(final char[] arr,
        final int offA, final int offB,
        final int len) {
      if (offA < 0 || offB < 0
          || offA >= arr.length || offB >= arr.length
          || offA + len > arr.length || offB + len > arr.length) {
        return false;
      }
  
      for (int i = 0; i < len; ++i) {
        if (arr[offA + i] != arr[offB + i]) {
          return false;
        }
      }
  
      return true;
    }