getBOM

fnimmutable(BOMSeq) getBOM(Range)(Range input) if (isForwardRange!Range && is(immutable ElementType!Range == immutable ubyte))

Returns a BOMSeq for a given input. If no BOM is present the BOMSeq for BOM.none is returned. The BOM sequence at the beginning of the range will not be comsumed from the passed range. If you pass a reference type range make sure that save creates a deep copy.

Parameters

inputThe sequence to check for the BOM

Returns

the found BOMSeq corresponding to the passed input.