1Uchar(3)                           OCamldoc                           Uchar(3)
2
3
4

NAME

6       Uchar - Unicode characters.
7

Module

9       Module   Uchar
10

Documentation

12       Module Uchar
13        : sig end
14
15
16       Unicode characters.
17
18
19       Since 4.03
20
21
22
23
24
25       type t
26
27
28       The type for Unicode characters.
29
30       A  value  of  this  type represents an Unicode scalar value which is an
31       integer in the ranges 0x0000 ...  0xD7FF or 0xE000 ...  0x10FFFF .
32
33
34
35       val min : t
36
37
38       min is U+0000.
39
40
41
42       val max : t
43
44
45       max is U+10FFFF.
46
47
48
49       val succ : t -> t
50
51
52       succ u is the scalar value after u in the set of Unicode scalar values.
53
54
55       Raises Invalid_argument if u is Uchar.max .
56
57
58
59       val pred : t -> t
60
61
62       pred u is the scalar value before u in the set of Unicode  scalar  val‐
63       ues.
64
65
66       Raises Invalid_argument if u is Uchar.min .
67
68
69
70       val is_valid : int -> bool
71
72
73       is_valid n is true iff n is an Unicode scalar value (i.e. in the ranges
74       0x0000 ...  0xD7FF or 0xE000 ...  0x10FFFF ).
75
76
77
78       val of_int : int -> t
79
80
81       of_int i is i as an Unicode character.
82
83
84       Raises Invalid_argument if i does not satisfy Uchar.is_valid .
85
86
87
88       val to_int : t -> int
89
90
91       to_int u is u as an integer.
92
93
94
95       val is_char : t -> bool
96
97
98       is_char u is true iff u is a latin1 OCaml character.
99
100
101
102       val of_char : char -> t
103
104
105       of_char c is c as an Unicode character.
106
107
108
109       val to_char : t -> char
110
111
112       to_char u is u as an OCaml latin1 character.
113
114
115       Raises Invalid_argument if u does not satisfy Uchar.is_char .
116
117
118
119       val equal : t -> t -> bool
120
121
122       equal u u' is u = u' .
123
124
125
126       val compare : t -> t -> int
127
128
129       compare u u' is Pervasives.compare u u' .
130
131
132
133       val hash : t -> int
134
135
136       hash u associates a non-negative integer to u .
137
138
139
140
141
1422018-04-14                          source:                           Uchar(3)
Impressum