Merge pull request #1 from raphael-proust/main

Remove findlib dynlink
This commit is contained in:
Tan, Kian-ting 2023-08-29 23:10:21 +08:00 committed by GitHub
commit 11fbe53e74
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 23 additions and 6 deletions

View file

@ -1,4 +1,5 @@
(lang dune 3.9)
(cram enable)
(name stringCodepointSplitter)
(version 0.0.1)

View file

@ -1,4 +1,4 @@
(library
(name stringCodepointSplitter)
(public_name stringCodepointSplitter)
(libraries uutf findlib.dynload))
(libraries uutf))

View file

@ -13,9 +13,6 @@ Under MIT License
It only contains [split_string_by_unicode_codepoint], which splits an OCaml string [str] to a [string list]
*)
let _ = Findlib.init ();;
Fl_dynload.load_packages ["uutf"];;
(** Split an OCaml string [str] to a [string list]

View file

@ -1,2 +1,6 @@
(test
(name stringCodepointSplitter))
(executable
(libraries stringCodepointSplitter)
(name stringCodepointSplitterTest))
(cram
(deps ./stringCodepointSplitterTest.exe))

View file

@ -0,0 +1,11 @@
ASCII only
$ ./stringCodepointSplitterTest.exe abc
a
b
c
Still simple but not just ASCII
$ ./stringCodepointSplitterTest.exe «»
«
»

View file

@ -0,0 +1,4 @@
let () =
Sys.argv.(1)
|> StringCodepointSplitter.split_string_by_unicode_codepoint
|> List.iter print_endline