code: public static boolean matchesSequence(
          char[] array,
          int arrayPos,
          char[] sequence)
      {
          int i;
          int j;
          for (i = arrayPos, j = 0; i < array.length && j < sequence.length; i++, j++) {
              if (array[i] != sequence[j]) {
                  break;
              }
          }
          return j == sequence.length;
      }
docs: Indicate if the specified sequence starts from the given position in the
  character array.
  
  @param array the array of characters
  @param arrayPos the position of the first character in the array;
  starting from this position the sequence should be skipped
  @param sequence the sequence of characters to match
  @return true if the sequence is found, false otherwise