0

how can i get the value of pickey from this string.this string as such is stored in coredata and i need to extract the value of pickey.how can i do this using nscanner.which method should i use?

@"http://myserverIP/[email protected]&key=442205212&hash=63b201cacb5c07f6adbc8f3dcb408099d3450548&pickey=21342342342342341231" 

1 Answer 1

1
NSScanner *scanner = [NSScanner scannerWithString:myString]; [scanner scanUpToString:@"pickey=" intoString:NULL]; if ([scanner scanString:@"pickey=" intoString:NULL]) { long long pickeyValue = 0; if ([scanner scanLongLong:&pickeyValue]) { // Successfully found an integer value at this position ... } } 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.