From 11d968eb049fecfa6d8882cd26a2b291fa256a1c Mon Sep 17 00:00:00 2001 From: "Tan, Kian-ting" Date: Sun, 27 Aug 2023 04:39:10 +0800 Subject: [PATCH] Update README.md --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index b594034..6841e65 100644 --- a/README.md +++ b/README.md @@ -5,3 +5,14 @@ Split a string to a list of strings of a character by the unicode codepoint. It requires module Uutf. for documantations, see `docs` + +## Example + +```OCaml + +let example = "m̄知 who you're." (*don't know who you are*) in + +List.map (fun x -> print_string (x ^ ", ")) (StringCodepointSplitter.split_string_by_unicode_codepoint example);; + +(*it will output : "m, ̄, 知, , w, h, o, , y, o, u, ', r, e, ., "*) +```