package uutf

  1. Overview
  2. Docs
On This Page
  1. Buffer encoders
Legend:
Library
Module
Module type
Parameter
Class
Class type

UTF encode characters in OCaml Buffer.t values.

Buffer encoders

Warning. All the functions below assumes that u is a unicode scalar value. If you are handling foreign data you can use is_uchar to assert that.

val add_utf_8 : Buffer.t -> uchar -> unit

add_utf_8 b u adds the UTF-8 encoding of the unicode scalar value u to b.

val add_utf_16be : Buffer.t -> uchar -> unit

add_utf_16be b u adds the UTF-16BE encoding of the unicode scalar value u to b.

val add_utf_16le : Buffer.t -> uchar -> unit

add_utf_16le b u adds the UTF-16LE encoding of the unicode scalar value u to b.

OCaml

Innovation. Community. Security.