I want to call [NSString compare:options:range:] and pass no options.
What should be the correct value to provide for the options parameter?
Both nil and NULL produce a warning in Xcode : "Incompatible pointer to integer conversion sending 'void *' to parameter of type ... "
Just pass 0
. Alternatively, if you've been around the Mac block a few times, you might catch yourself passing kNilOptions
which is just another name for 0
, but implies the relevant flagginess.
You should pass 0
. The options
argument is a bit mask, which really means it's just an integer. That's also why the warning says "integer conversion".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With