code: public static BinaryString concatWs(BinaryString separator, Iterable<BinaryString> inputs) {
  		if (null == separator || EMPTY_UTF8.equals(separator)) {
  			return concat(inputs);
  		}
  		separator.ensureMaterialized();
  
  		int numInputBytes = 0;  // total number of bytes from the inputs
  		int numInputs = 0;      // number of non-null inputs
  		for (BinaryString input : inputs) {
  			if (input != null) {
  				input.ensureMaterialized();
  				numInputBytes += input.sizeInBytes;
  				numInputs++;
  			}
  		}
  
  		if (numInputs == 0) {
  			// Return an empty string if there is no input, or all the inputs are null.
  			return EMPTY_UTF8;
  		}
  
  		// Allocate a new byte array, and copy the inputs one by one into it.
  		// The size of the new array is the size of all inputs, plus the separators.
  		final byte[] result = new byte[numInputBytes + (numInputs - 1) * separator.sizeInBytes];
  		int offset = 0;
  
  		int j = 0;
  		for (BinaryString input : inputs) {
  			if (input != null) {
  				int len = input.sizeInBytes;
  				SegmentsUtil.copyToBytes(input.segments, input.offset, result, offset, len);
  				offset += len;
  
  				j++;
  				// Add separator if this is not the last input.
  				if (j < numInputs) {
  					SegmentsUtil.copyToBytes(separator.segments, separator.offset, result, offset, separator.sizeInBytes);
  					offset += separator.sizeInBytes;
  				}
  			}
  		}
  		return fromBytes(result);
  	}
docs: Concatenates input strings together into a single string using the separator.
  A null input is skipped. For example, concat(",", "a", null, "c") would yield "a,c".