Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 56 lines (44 sloc) 1.666 kb
fccc685 Initial open-source release
MLstate authored
1 (*
2 Copyright © 2011 MLstate
3
4 This file is part of OPA.
5
6 OPA is free software: you can redistribute it and/or modify it under the
7 terms of the GNU Affero General Public License, version 3, as published by
8 the Free Software Foundation.
9
10 OPA is distributed in the hope that it will be useful, but WITHOUT ANY
11 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
13 more details.
14
15 You should have received a copy of the GNU Affero General Public License
16 along with OPA. If not, see <http://www.gnu.org/licenses/>.
17 *)
18 (** Charf:
19 Versions of Char character predicates based on lookup tables.
20 Some tests 10% faster, others several times faster.
21 Also some highly specialised tests mostly used in HttpTools and Encodings.
22 *)
23
24 (** Fast character predicates *)
25 val is_digitf : char -> bool
26 val is_hexf : char -> bool
27 val is_lowerf : char -> bool
28 val is_upperf : char -> bool
29 val is_alphaf : char -> bool
30 val is_spacef : char -> bool
31 val is_luf : char -> bool
32 val is_sptabf : char -> bool
33 val is_namef : char -> bool
34 val is_charf : char -> bool
35 val is_urlf : char -> bool
36 val is_sepf : char -> bool
37 val is_htmlcharf : char -> bool
38 val is_urlxf : char -> bool
39 val is_awsf : char -> bool
40
41 (** Fast character conversions *)
42
43 (** Hex char to number. *)
44 val hcodef : char -> int
45
46 (** Three decimal digits to int *)
47 val c3i : char -> char -> char -> int
48
49 (** Two hexadecimal digits to int *)
50 val c2h : char -> char -> int
51
52 (** Four unicode chars to string *)
53 val c4u : char -> char -> char -> char -> string
54
55 (* End of file charf.mli *)
Something went wrong with that request. Please try again.