docs: public BinaryString[] splitByWholeSeparatorPreserveAllTokens(BinaryString separator) {
  		ensureMaterialized();
  		final int len = sizeInBytes;
  
  		if (len == 0) {
  			return EMPTY_STRING_ARRAY;
  		}
  
  		if (separator == null || EMPTY_UTF8.equals(separator)) {
  			// Split on whitespace.
  			return splitByWholeSeparatorPreserveAllTokens(fromString(" "));
  		}
  		separator.ensureMaterialized();
  
  		final int separatorLength = separator.sizeInBytes;
  
  		final ArrayList<BinaryString> substrings = new ArrayList<>();
  		int beg = 0;
  		int end = 0;
  		while (end < len) {
  			end = SegmentsUtil.find(
  				segments, offset + beg, sizeInBytes - beg,
  				separator.segments, separator.offset, separator.sizeInBytes) - offset;
  
  			if (end > -1) {
  				if (end > beg) {
  
  					// The following is OK, because String.substring( beg, end ) excludes
  					// the character at the position 'end'.
  					substrings.add(BinaryString.fromAddress(segments, offset + beg, end - beg));
  
  					// Set the starting point for the next search.
  					// The following is equivalent to beg = end + (separatorLength - 1) + 1,
  					// which is the right calculation:
  					beg = end + separatorLength;
  				} else {
  					// We found a consecutive occurrence of the separator.
  					substrings.add(EMPTY_UTF8);
  					beg = end + separatorLength;
  				}
  			} else {
  				// String.substring( beg ) goes from 'beg' to the end of the String.
  				substrings.add(BinaryString.fromAddress(segments, offset + beg, sizeInBytes - beg));
  				end = len;
  			}
  		}
  
  		return substrings.toArray(new BinaryString[0]);
  	}