Function detectBOM

Using the given random access range of bytes, determine the stream width. This does not advance the range past the BOM.

UTFType detectBOM(R) (
  R r
if (isRandomAccessRange!R && hasLength!R && is(ElementType!R : const(ubyte)));


r Range in which to detect BOM. Must be a random access range with element type of ubyte. Cannot be an infinite range.


Instance of UTFType indicating what the BOM decoding implies.