Dart API Referencedart:utfIterableUtf8Decoder

IterableUtf8Decoder class

Return type of decodeUtf8AsIterable and variants. The Iterable type provides an iterator on demand and the iterator will only translate bytes as requested by the user of the iterator. (Note: results are not cached.)

class IterableUtf8Decoder implements Iterable<int> {
  final List<int> bytes;
  final int offset;
  final int length;
  final int replacementCodepoint;

  IterableUtf8Decoder(this.bytes, [this.offset = 0, this.length = null,
      this.replacementCodepoint = UNICODE_REPLACEMENT_CHARACTER_CODEPOINT]);

  Utf8Decoder iterator() => new Utf8Decoder(bytes, offset, length,
          replacementCodepoint);
}

Implements

Iterable<E>

Constructors

new IterableUtf8Decoder(List<int> bytes, [int offset = 0, int length = null, int replacementCodepoint = UNICODE_REPLACEMENT_CHARACTER_CODEPOINT]) #

IterableUtf8Decoder(this.bytes, [this.offset = 0, this.length = null,
    this.replacementCodepoint = UNICODE_REPLACEMENT_CHARACTER_CODEPOINT]);

Properties

final List<int> bytes #

final List<int> bytes;

final int length #

final int length;

final int offset #

final int offset;

final int replacementCodepoint #

final int replacementCodepoint;

Methods

Utf8Decoder iterator() #

Returns an Iterator that iterates over this Iterable object.

docs inherited from Iterable<E>
Utf8Decoder iterator() => new Utf8Decoder(bytes, offset, length,
        replacementCodepoint);