aboutsummaryrefslogtreecommitdiff
path: root/UTF8.ml
diff options
context:
space:
mode:
Diffstat (limited to 'UTF8.ml')
-rwxr-xr-xUTF8.ml36
1 files changed, 36 insertions, 0 deletions
diff --git a/UTF8.ml b/UTF8.ml
new file mode 100755
index 0000000..33df5b4
--- /dev/null
+++ b/UTF8.ml
@@ -0,0 +1,36 @@
+include Text
+
+let empty = ""
+
+let decode x = Text.decode x
+
+let encode x = Text.encode x
+
+let from_utf8string x = x
+
+let to_utf8string x = x
+
+let trim x = Text.strip x
+
+let split str ~sep =
+ match Text.split ~max:1 ~sep str with
+ | [] -> ""
+ | hd::tl -> hd
+
+module Buffer = struct
+
+ include Buffer
+
+ type buffer = t
+
+ let add_char b c = Uchar.of_char c
+ |> Uchar.to_int
+ |> Text.char
+ |> Buffer.add_string b
+end
+
+module Printf = struct
+
+ include Printf
+
+end