Module CCChar

Utils around char

include module type of Char
external code : char ‑> int = "%identity"
val chr : int ‑> char
val escaped : char ‑> string
val lowercase : char ‑> char
  • Deprecated Use Char.lowercase_ascii instead.
val uppercase : char ‑> char
  • Deprecated Use Char.uppercase_ascii instead.
val lowercase_ascii : char ‑> char
val uppercase_ascii : char ‑> char
type t = char
val compare : t ‑> t ‑> int
val equal : t ‑> t ‑> bool
external unsafe_chr : int ‑> char = "%identity"
val equal : t ‑> t ‑> bool

The equal function for chars.

val compare : t ‑> t ‑> int

The comparison function for characters, with the same specification as Pervasives.compare. Along with the type t, this function compare allows the module Char to be passed as argument to the functors Set.Make and Map.Make.

val lowercase_ascii : t ‑> t

Convert the given character to its equivalent lowercase character, using the US-ASCII character set.

val uppercase_ascii : t ‑> t

Convert the given character to its equivalent uppercase character, using the US-ASCII character set.

val of_int_exn : int ‑> t

Alias to Char.chr. Return the character with the given ASCII code.

val of_int : int ‑> t option

Safe version of of_int_exn.

val to_int : t ‑> int

Alias to Char.code. Return the ASCII code of the argument.

val pp_buf : Buffer.t ‑> t ‑> unit

Used to be pp, changed name

val pp : Format.formatter ‑> t ‑> unit

Used to be print, changed name