code: public static <S extends Sequence<S>> int mismatchCount(S seq0, int seq0Offset, S seq1, int seq1Offset, int length) {
          if (seq0.size() < seq0Offset + length || seq1.size() < seq1Offset + length)
              throw new IllegalArgumentException();
  
          int mm = 0;
          for (int i = 0; i < length; ++i)
              if (seq0.codeAt(i + seq0Offset) != seq1.codeAt(i + seq1Offset))
                  ++mm;
          return mm;
      }
docs: Calculates number of mismatches (comparing position by position) between two regions of one or two different
  sequences.
  
  @param seq0       first sequence
  @param seq0Offset first letter of second region in first sequence
  @param seq1       second sequence (may be the same as {@code seq0}
  @param seq1Offset first letter of second region in second sequence
  @param length     length of both regions
  @param <S>        type of sequence
  @return number of mismatches
  @throws java.lang.IllegalArgumentException if one of regions is outside of target sequence