Talk:Copy a string: Difference between revisions

From Rosetta Code
Content added Content deleted
(isn't there an error in Objective-C example ?)
 
 
Line 4: Line 4:
shoudn't it be this below ?
shoudn't it be this below ?
<lang objc>NSMutableString *newMutable = [original mutableCopy];</lang>
<lang objc>NSMutableString *newMutable = [original mutableCopy];</lang>
:Well, it's not wrong -- since NSMutableString is a subclass of NSString -- it just makes it less useful. --[[Special:Contributions/164.67.199.150|164.67.199.150]] 05:34, 18 November 2009 (UTC)

Latest revision as of 05:34, 18 November 2009

Objective-C Example

Well I don't know Objective-C, but looking at the examples isn't there an error on this line: <lang objc>NSString *newMutable = [original mutableCopy];</lang> shoudn't it be this below ? <lang objc>NSMutableString *newMutable = [original mutableCopy];</lang>

Well, it's not wrong -- since NSMutableString is a subclass of NSString -- it just makes it less useful. --164.67.199.150 05:34, 18 November 2009 (UTC)