Hello, The book I'm studying on Objective-C says that isEqualToString: is declared like this:
- (BOOL) isEqualToString: (NSSTRING *) aString;
I know that the BOOL means it returns a BOOL value, but I dont know how to read the rest of the line. The * means that NSSTRING is a pointer, correct? what is aString?
The book has this example on how to use it:
if ([thing1 isEqualToString: thing2]) {
NSLog (@"They are the same");
}
Again I am confused as to how to read the bolded line and relate it to the declaration. It seems weird that a parameter (thing1) is before the function (isEqualToString. Can anyone help me understand the bolded line?
- (BOOL) isEqualToString: (NSSTRING *) aString;
I know that the BOOL means it returns a BOOL value, but I dont know how to read the rest of the line. The * means that NSSTRING is a pointer, correct? what is aString?
The book has this example on how to use it:
if ([thing1 isEqualToString: thing2]) {
NSLog (@"They are the same");
}
Again I am confused as to how to read the bolded line and relate it to the declaration. It seems weird that a parameter (thing1) is before the function (isEqualToString. Can anyone help me understand the bolded line?