I'm trying to take a string like "hello world : bye world" and get ["hello world"; ":" ;"bye world"].
I'm trying to take a string like "hello world : bye world" and get ["hello world"; ":" ;"bye world"].
This is the simplest function I can think of to pass your test case.
let split (str:string) =
str.Split ':'
|> Seq.collect(fun x -> [":"; x.Trim()])
|> Seq.tail
|> Seq.toList
split "hello world : bye world" // ["hello world"; ":"; "bye world"]