I have a NSMutableAttributedString
and want to convert it back into a simple String
.
var attributedString = NSMutableAttributedString(string: "hello w0rld")
How can I get just the String
out of a NSMutableAttributedString
the easiest?
Use the string
property on NSMutableAttributedString
:
var attributedString = NSMutableAttributedString(string: "hello, world!")
var s = attributedString.string