decodeUtf32le function

String decodeUtf32le(
  1. List<int> bytes, [
  2. int offset = 0,
  3. int? length,
  4. bool stripBom = true,
  5. int replacementCodepoint = UNICODE_REPLACEMENT_CHARACTER_CODEPOINT,
])

Produce a String from a sequence of UTF-32LE encoded bytes. The parameters allow an offset into a list of bytes (as int), limiting the length of the values be decoded and the ability of override the default Unicode replacement character. Set the replacementCharacter to null to throw an ArgumentError rather than replace the bad value.

Implementation

String decodeUtf32le(List<int> bytes,
        [int offset = 0,
        int? length,
        bool stripBom = true,
        int replacementCodepoint = UNICODE_REPLACEMENT_CHARACTER_CODEPOINT]) =>
    String.fromCharCodes((Utf32leBytesDecoder(
            bytes, offset, length, stripBom, replacementCodepoint))
        .decodeRest()
        .whereType<int>());