How i can convert NSString to long value?

Ankit Vyas picture Ankit Vyas · Mar 18, 2011 · Viewed 36.3k times · Source

I have one value 100023 and I have taken it in NSString.

Now I want to pass this value in my web service which contains long parameter type so how can I convert string value to long.

Answer

YPK picture YPK · Mar 18, 2011

You can use NSString methods intValue longLongValue.