Utf8Encoder class
This class converts strings to their UTF-8 code units (a list of unsigned 8-bit integers).
Example:
final utf8Encoder = utf8.encoder; const sample = 'Îñţérñåţîöñåļîžåţîờñ'; final encodedSample = utf8Encoder.convert(sample); print(encodedSample);
- Inheritance
Constructors
- Utf8Encoder() const
Properties
- hashCode → int read-only, inherited
- The hash code for this object.
- runtimeType → Type read-only, inherited
- A representation of the runtime type of the object.
Methods
- bind(
Stream< String> stream) → Stream<List< int> >override - Transforms the provided
stream. - cast<
RS, RT> () → Converter< RS, RT> inherited - Provides a
Converter<RS, RT>view of this stream transformer. - convert(
String string, [int start = 0, int? end]) → Uint8List override - Converts
stringto its UTF-8 code units (a list of unsigned 8-bit integers). - fuse<
TT> (Converter< List< other) → Converter<int> , TT>String, TT> inherited - Fuses
thiswithother. - noSuchMethod(
Invocation invocation) → dynamic inherited - Invoked when a non-existent method or property is accessed.
- startChunkedConversion(
Sink< List< sink) → StringConversionSinkint> >override - Starts a chunked conversion.
- toString(
) → String inherited - A string representation of this object.
Operators
- operator ==(
Object other) → bool inherited - The equality operator.
© 2012 the Dart project authors
Licensed under the BSD 3-Clause "New" or "Revised" License.
https://api.dart.dev/stable/2.18.5/dart-convert/Utf8Encoder-class.html