NSString *string = @"HELLO";
For some reason, XCode won’t auto-complete methods like remove characters or append etc… If that’s the case, how can I, say, remove certain characters from my string? Say I want to remove all the L’s.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
NSStringdoesn’t respond to those methods.NSMutableStringdoes, but you’ve declared an immutable string variable and assigned to it a string literal. Since an Objective-C@"string literal"is always immutable (an instance ofNSStringbut notNSMutableString), there’s no way those messages can be sent to the object you’re using.If you want a mutable string, try: