It works fine to cast a Swift String
as an NSString
.
let string = "some text"
let nsString = string as NSString
But when I do
let string = "some text"
let nsMutableString = string as NSMutableString
I get the error
'String' is not convertible to 'NSMutableString'
How to I convert it?