Sys.Signals module for a Variant type of signals (and a set_signal function that...
[ocaml.git] / stdlib / char.mli
blob8ab72bd9a60f9cc23960b5a3ad4beb2d6857d243
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 (***********************************************************************)
14 (* $Id$ *)
16 (** Character operations. *)
18 external code : char -> int = "%identity"
19 (** Return the ASCII code of the argument. *)
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. *)
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. *)
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. *)
37 type t = char
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}. *)
46 (**/**)
48 external unsafe_chr : int -> char = "%identity"