[back]

Split by Whitespace, Correctly

Implement the function

val split_by_ws : string -> string list

so that split_by_ws s is the list of contiguous non-whitespace substrings of s, in the order in which they appear, but without using implode and explode. Instead you should use String.sub and keep track of indices into s.