Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27360

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 27360

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>