decodeUtf8AsIterable function

IterableUtf8Decoder decodeUtf8AsIterable(
  1. List<int> bytes, [
  2. int offset = 0,
  3. int? length,
  4. int replacementCodepoint = UNICODE_REPLACEMENT_CHARACTER_CODEPOINT,
])

Decodes the UTF-8 bytes as an iterable. Thus, the consumer can only convert as much of the input as needed. Set the replacementCharacter to null to throw an ArgumentError rather than replace the bad value.

Implementation

IterableUtf8Decoder decodeUtf8AsIterable(List<int> bytes,
    [int offset = 0,
    int? length,
    int replacementCodepoint = UNICODE_REPLACEMENT_CHARACTER_CODEPOINT]) {
  return IterableUtf8Decoder(
    bytes,
    offset: offset,
    length: length ?? bytes.length,
    replacementCodepoint: replacementCodepoint,
  );
}