Skip to content
Newer
Older
100644 38 lines (31 sloc) 1.17 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 module String = BaseString
19 module Format = BaseFormat
20
21 (*
22 type t = string
23 <!> how to share abstract value between modules in ocaml ?
24 beware : keep sync with implementation in bslKeyMap
25 *)
26 type t = string
27 let compare = String.compare
28 external to_string : string -> t = "%identity"
29 let pp = Format.pp_print_string
30 external of_string : t -> string = "%identity"
31 let normalize name =
32 let name = String.lowercase (String.trim name) in
33 String.replace name "." "_"
34 let normalize_string = normalize
35
36 let equal = String.equal
37 let hash = String.hash
Something went wrong with that request. Please try again.