Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 42225

string.split, first char of similar characters.

$
0
0
HI. Usual non string person here.
I have some values like "asdasd, 1234,3" and "xcvzxcv", 355,44"
I would like to split them but only take in consideration the first "," character. So the above will split to:
"asdasd 1234,3" or
"asdasd"
"1234,3"

I am not sure about the one i will use right now but i just want to ask about the "," problem. Currently i am thinking of replacing the first occurrence of "," with a special non used char and then split or i could go the long way with a loop but i am sure there is a better way.
If possible a non linq like way but it's not mandatory.
Thanks

Viewing all articles
Browse latest Browse all 42225

Trending Articles