StringToBytesExtension extension
Extension to add asBytes
handling to string
- on
Methods
-
asBytes(
Encoding encoding, {Endian endian = Endian.big}) → Uint8ClampedList -
Convert the string to an unmodifiable byte list using the specifed
encoding
. If, for some reason, you want to manipulate the endianness of the result, then theendian
value can be changed to suite your needs.