1 (***********************************************************************)
5 (* Xavier Leroy, projet Cristal, INRIA Rocquencourt *)
7 (* Copyright 1996 Institut National de Recherche en Informatique et *)
8 (* en Automatique. All rights reserved. This file is distributed *)
9 (* under the terms of the GNU Library General Public License, with *)
10 (* the special exception on linking described in file ../LICENSE. *)
12 (***********************************************************************)
14 (* $Id: char.mli 7164 2005-10-25 18:34:07Z doligez $ *)
16 (** Character operations. *)
18 external code : char -> int = "%identity"
19 (** Return the ASCII code of the argument. *)
22 (** Return the character with the given ASCII code.
23 Raise [Invalid_argument "Char.chr"] if the argument is
24 outside the range 0--255. *)
26 val escaped : char -> string
27 (** Return a string representing the given character,
28 with special characters escaped following the lexical conventions
31 val lowercase : char -> char
32 (** Convert the given character to its equivalent lowercase character. *)
34 val uppercase : char -> char
35 (** Convert the given character to its equivalent uppercase character. *)
38 (** An alias for the type of characters. *)
40 val compare: t -> t -> int
41 (** The comparison function for characters, with the same specification as
42 {!Pervasives.compare}. Along with the type [t], this function [compare]
43 allows the module [Char] to be passed as argument to the functors
44 {!Set.Make} and {!Map.Make}. *)
48 external unsafe_chr : int -> char = "%identity"