]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/ocaml/contrib/stdlib/char.mli
update
[l4.git] / l4 / pkg / ocaml / contrib / stdlib / char.mli
1 (***********************************************************************)
2 (*                                                                     *)
3 (*                           Objective Caml                            *)
4 (*                                                                     *)
5 (*            Xavier Leroy, projet Cristal, INRIA Rocquencourt         *)
6 (*                                                                     *)
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.     *)
11 (*                                                                     *)
12 (***********************************************************************)
13
14 (* $Id: char.mli 7164 2005-10-25 18:34:07Z doligez $ *)
15
16 (** Character operations. *)
17
18 external code : char -> int = "%identity"
19 (** Return the ASCII code of the argument. *)
20
21 val chr : int -> char
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. *)
25
26 val escaped : char -> string
27 (** Return a string representing the given character,
28    with special characters escaped following the lexical conventions
29    of Objective Caml. *)
30
31 val lowercase : char -> char
32 (** Convert the given character to its equivalent lowercase character. *)
33
34 val uppercase : char -> char
35 (** Convert the given character to its equivalent uppercase character. *)
36
37 type t = char
38 (** An alias for the type of characters. *)
39
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}. *)
45
46 (**/**)
47
48 external unsafe_chr : int -> char = "%identity"