This is really only seeking an opinion.
I have two ways of getting the data I want ( being whatever is to the left of the first space ).
OR
These both will return exactly what I need. Tho, the first way will give me an error if there is no " " in the string.
In the current data that I'm working with, there will always be a " " in the data and no leading space.
Here's another example, showing why I like 'Split...()(#)' more.
Imagine a line of text from a router config that has an ip address, that looks like: " ip address 192.168.0.25 255.255.255"
So:
Alternatively, I could have used the array completely:
Beyond that, I could further Split(sIP,".") to get the IP pieces.
Which do you think is better (And why)?
Bookmarks