aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Camlcoq.ml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Camlcoq.ml')
-rw-r--r--lib/Camlcoq.ml10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Camlcoq.ml b/lib/Camlcoq.ml
index 90c3ab3f..7e8a1018 100644
--- a/lib/Camlcoq.ml
+++ b/lib/Camlcoq.ml
@@ -318,6 +318,16 @@ let coqstring_of_camlstring s =
if pos < 0 then accu else cstring (s.[pos] :: accu) (pos - 1)
in cstring [] (String.length s - 1)
+let coqstring_uppercase_ascii_of_camlstring s =
+ let rec cstring accu pos =
+ if pos < 0 then accu else
+ let d = if s.[pos] >= 'a' && s.[pos] <= 'z' then
+ Char.chr (Char.code s.[pos] - 32)
+ else
+ s.[pos] in
+ cstring (d :: accu) (pos - 1)
+ in cstring [] (String.length s - 1)
+
(* Floats *)
let coqfloat_of_camlfloat f =