package lablgtk3

  1. Overview
  2. Docs
OCaml interface to GTK+3

Install

Dune Dependency

Authors

Maintainers

Sources

lablgtk3-3.1.5.tbz
sha256=d4821cdbecf3ae374f20317d63e43fe58030c3ba9657b51a2e83e652197e8eac
sha512=83f0be38a1e21737de93f88b0adac15cdcc50cf712d773720b9bc1e8d8ffdb2c660d35840f25d326a42a9d4e6537e6cef466099bf72494196b2cc79977e703e3

doc/lablgtk3/Gutf8/index.html

Module Gutf8Source

Pure ocaml module for conversion between UCS and UTF8

Sourcetype unichar = int
Sourcetype unistring = unichar array
Sourceval from_unichar : unichar -> string

from_unichar 0xiii converts a code point iii (usually in hexadecimal form) into a string containing the UTF-8 encoded character 0xiii. See unicode.org for charmaps. Does not check that the given code point is a valid unicode point.

Sourceval from_unistring : unistring -> string
Sourceval to_unichar_validated : string -> pos:int ref -> unichar

to_unichar_validated decodes an UTF-8 encoded code point and checks for incomplete characters, invalid characters and overlong encodings.

  • raises Convert.Error

    if invalid

Sourceval to_unichar : string -> pos:int ref -> unichar

to_unichar decodes an UTF-8 encoded code point. Result is undefined if pos does not point to a valid UTF-8 encoded character.

Sourceval to_unistring : string -> unistring

to_unistring decodes an UTF-8 encoded string into an array of unichar. The string must be valid.

Sourceval first_char : string -> unichar

first_char returns the first UTF-8 encoded code point.

Sourceval next : string -> pos:int -> int

next returns the position of the code point following the one at pos.

Sourceval length : string -> int

length returns the number of code-points in the UTF-8 encode string

Sourcemodule Error : sig ... end

to_unichar_validated may raise PARTIAL_INPUT or ILLEGAL_SEQUENCE

OCaml

Innovation. Community. Security.