package ocamlformat-mlx-lib

  1. Overview
  2. Docs
OCaml .mlx Code Formatter

Install

dune-project
 Dependency

Authors

Maintainers

Sources

ocamlformat-mlx-0.28.1.2.tbz
sha256=af4e7ed7e84bd681e1058c3573e255427aa3c3a9952c115f1c2441295766d14c
sha512=48a153ad33283a95b3d5a54cd04e8a26feb5d394b291a45aa01f77e376bcfc94a2b6350b3f3611a3d2511f25b0f69f6d2d694d7ace81004ed7e6850ac6947b4c

doc/ocamlformat-mlx-lib.stdlib_shims/Ocamlformat_stdlib_shims/Uchar/index.html

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.

  • before 5.3

    The hashing algorithm was different. Use Hashtbl.rebuild for stored tables which used this hashing function

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_decode_length_of_byte : char -> int

utf_8_decode_length_of_byte byte is the number of bytes, from 1 to max_utf_8_decode_length, that a valid UTF-8 decode starting with byte byte would consume or 0 if byte cannot start a valid decode.

  • since 5.4
Sourceval max_utf_8_decode_length : int

max_utf_8_decode_length is 4, the maximal number of bytes a valid or invalid UTF-8 decode can consume.

  • since 5.4
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