I am using this to split strings:
let split = Str.split (Str.regexp_string \" \") in let tokens = split instr in ....
But the problem
Since OCaml 4.04.0 there is also String.split_on_char, which you can combine with List.filter to remove empty strings:
String.split_on_char
List.filter
# "pop esi" |> String.split_on_char ' ' |> List.filter (fun s -> s <> "");; - : string list = ["pop"; "esi"]
No external libraries required.