Quantcast
Channel: using the string.split function but getting an unexpected result - Stack Overflow
Browsing all 4 articles
Browse latest View live

Answer by DerpyDog for using the string.split function but getting an...

if you wanted the application to check if it is a legit whole number, you could just add equationArray[0] == null || equationArray[0] == "" || equationArray[0] == " " to your if statement.

View Article



Answer by Charles Mager for using the string.split function but getting an...

There is a space before +, so it will split there with an empty string on one side and + on the other. You might find the option to remove empty entries useful - this would also result in collapsing...

View Article

Answer by tolanj for using the string.split function but getting an...

I would also assume "1 + 2" is legal, i.e. in general whitespace of any length is only of relevance for splitting tokens ? Therefore you need to use an overload of Split that takes a StringSplitOptions...

View Article

using the string.split function but getting an unexpected result

So i am attempting to make a calculator and I am unsure of how to take the equation and split it up into operators and operands. I have chosen to do this by using the string.split function to turn it...

View Article
Browsing all 4 articles
Browse latest View live




Latest Images