code: private static boolean checkBegin(
  		BinaryString pattern, MemorySegment[] segments, int start, int len) {
  		int lenSub = pattern.getSizeInBytes();
  		return len >= lenSub &&
  				SegmentsUtil.equals(pattern.getSegments(), 0, segments, start, lenSub);
  	}
docs: Matches the beginning of each string to a pattern.