hasUtf16Bom function
Identifies whether a List of bytes starts (based on offset) with a byte-order marker (BOM).
Implementation
bool hasUtf16Bom(List<int> utf32EncodedBytes, [int offset = 0, int? length]) {
return hasUtf16BeBom(utf32EncodedBytes, offset, length) ||
hasUtf16LeBom(utf32EncodedBytes, offset, length);
}