Module irox_bits::utf

source ·
Expand description

UTF-8 Encoding & Decoding

Using info from: here

Functions§

  • Encodes the character into the provided buffer using UTF-8. A subslice of the provided buffer is returned providing the amount of buffer actually used.
  • Reads 1, 2, 3, or 4 bytes representing the unicode UTF-8 formatted character from the specified input. Returns the character read and the number of bytes consumed.
  • Returns the number of required bytes to store the specified character in UTF-8.
  • Writes 1, 2, 3, or 4 bytes representing the unicode UTF-8 format character to the specified output. Upon success, returns the number of bytes written.