UTF8Encoder class

Encodes a Dart String (UTF-16) to UTF-8 bytes.

Constructors

UTF8Encoder()

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

encode(String s) → BuBytes
Encodes s to UTF-8 bytes. Single pass: each code point is resolved once and its 1-4 UTF-8 bytes written immediately - no separate length-counting pass first.
inBytesLength(String s) → int
The number of UTF-8 bytes s would encode to, without actually allocating/writing them - useful for sizing a buffer you're writing into yourself.