aboutsummaryrefslogtreecommitdiff
path: root/UTF8.ml
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@chimrod.com>2016-11-15 13:00:01 +0100
committerSébastien Dailly <sebastien@chimrod.com>2016-11-15 13:00:01 +0100
commitef312564ca84a2b49fc291434d8fb2f8501bb618 (patch)
tree79415fcf225e6da1042c8edaae5e4a74c7a983cb /UTF8.ml
Initial commit
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