I want to call [NSString compare: options: range:] and not pass any parameters.
What should be the correct value for the parameter parameter?
Both nil and NULL raise a warning in Xcode: "Incompatible pointer to integer conversion sending" void * "to a type parameter ..."
Just go through 0 . Alternatively, if you have visited the Mac block several times, you can catch the passage kNilOptions , which is just another name for 0 , but implies the corresponding flags.
0
kNilOptions
You must pass 0 . The options argument is a bit mask, which actually means that it is just an integer. This is also why the warning says "integer conversion".
options
According to Apple Docs:
Search parameters - you can combine any of the following actions using the bitwise OR operator: NSCaseInsensitiveSearch, NSLiteralSearch, NSNumericSearch. See the String Programming Guide for more information on these options.
NSCaseInsensitiveSearch : NSCaseInsensitiveSearch search.
NSCaseInsensitiveSearch
NSLiteralSearch : Exact symbolic equivalence.
NSLiteralSearch
NSNumericSearch : The numbers in the strings are compared using a numeric value, i.e. Name2.txt <Name7.txt <Name25.txt.
NSNumericSearch
String Programming Guide