Sj.
Sj.

Reputation: 592

Nsrange problem when it should return 0

So, I am trying to search an nsstring for a term us rangeFromString, but whenever there is not anything matching that result, I get something along the lines of 2748601949 as opposed to 0. I am trying to, for example, locate @"sin(",@"cos(", and @"tan(" in a string like @"1+sin(28)+cos(72)". Thank you

Upvotes: 0

Views: 272

Answers (1)

Dave DeLong
Dave DeLong

Reputation: 243146

It's returning NSNotFound, which is defined in NSObjCRuntime.h like this:

enum {NSNotFound = NSIntegerMax};

Upvotes: 3

Related Questions