FAQ Database Discussion Community


Getting an error when creating an NSMutableString when iterating an NSCountedSet in Objective-C

ios,objective-c,nsmutablestring,nscountedset
I am iterating an NSCountedSet in a for-loop, and then trying to create an NSMutableString that is composed of the NSString object it holds, as well as the count for that particular object, and then insert the newly created NSMutableString into an NSMutableArray. However, when I do this, I am...

Difference between stringByAppendingString and appendString in ios

ios,objective-c,swift,nsstring,nsmutablestring
What is the difference between stringByAppendingString and appendString? If NSString is not mutable then how could it append string?

Objective C - Extract substring by finding first and second occurrence of a character

objective-c,nsmutablestring
I am trying to port my Android app to iOS. I need to extract the string present between the first and second occurrence of the single quote ' character. For example, from javascript:popUpWindow7('news_details.asp?slno=2029',620,300,100,100,'yes'), I need to extract news_details.asp?slno=2029. In Java, I did this: String inputUrl = "javascript:popUpWindow7('news_details.asp?slno=2029',620,300,100,100,'yes')"; StringBuilder url =...

Parsing NSMutableString By Number Of Instances

objective-c,nsmutablestring
I have an NSMutableString that contains a lot of data. A short example of it is: MP3: name length album MP3: name length album MP3: name length album MP3: name length album Now, what I'm trying to accomplish is to parse the string to contain only the first 3 MP3...