package ocamlformat-mlx-lib

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Ocamlformat_stdlib_shims.UcharSource

include module type of struct include Uchar end
Sourcetype t = Uchar.t

The type for Unicode characters.

A value of this type represents a Unicode scalar value which is an integer in the ranges 0x0000...0xD7FF or 0xE000...0x10FFFF.

Sourceval min : t

min is U+0000.

Sourceval max : t

max is U+10FFFF.

Sourceval bom : t

bom is U+FEFF, the byte order mark (BOM) character.

  • since 4.06
Sourceval succ : t -> t

succ u is the scalar value after u in the set of Unicode scalar values.

Sourceval pred : t -> t

pred u is the scalar value before u in the set of Unicode scalar values.

Sourceval is_valid : int -> bool

is_valid n is true if and only if n is a Unicode scalar value (i.e. in the ranges 0x0000...0xD7FF or 0xE000...0x10FFFF).

Sourceval of_int : int -> t

of_int i is i as a Unicode character.

Sourceval to_int : t -> int

to_int u is u as an integer.

Sourceval is_char : t -> bool

is_char u is true if and only if u is a latin1 OCaml character.

Sourceval of_char : char -> t

of_char c is c as a Unicode character.

Sourceval to_char : t -> char

to_char u is u as an OCaml latin1 character.

Sourceval equal : t -> t -> bool

equal u u' is u = u'.

Sourceval compare : t -> t -> int

compare u u' is Stdlib.compare u u'.

Sourceval seeded_hash : int -> t -> int

seeded_hash seed u A seeded hash function with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as an argument to the functor Hashtbl.MakeSeeded.

  • since 5.3
Sourceval hash : t -> int

An unseeded hash function with the same output value as Hashtbl.hash. This function allows this module to be passed as an argument to the functor Hashtbl.Make.

  • since 5.3

UTF codecs tools

  • since 4.14
Sourcetype utf_decode = Uchar.utf_decode

The type for UTF decode results. Values of this type represent the result of a Unicode Transformation Format decoding attempt.

Sourceval utf_8_byte_length : t -> int

utf_8_byte_length u is the number of bytes needed to encode u in UTF-8.

Sourceval utf_16_byte_length : t -> int

utf_16_byte_length u is the number of bytes needed to encode u in UTF-16.

Sourceval rep_ : int
Sourceval rep : t
Sourceval valid_bit : int
Sourceval decode_bits : int
Sourceval utf_decode_is_valid : int -> bool
Sourceval utf_decode_length : int -> int
Sourceval utf_decode_uchar : int -> t
Sourceval utf_decode : int -> t -> int
Sourceval utf_decode_invalid : int -> int
OCaml

Innovation. Community. Security.