vb.net - Split each character in a string into an array so long as theres a space? -
i'm working on little side project , need turn string this: ab c de f g
to array so: ab,c,de,f,g have tried using
dim string string = "ab c de f g" dim chararray() char = string.tochararray
but splits every character array (a,b, ,c, ,d,e, ,f, ,g), how can make split between spaces?
it seems job string.split
dim source string = "ab c de f g" dim result string() = source.split(" "c) each s in result console.writeline(s) next
Comments
Post a Comment