i am having the hexValue of $ like string and i have searched that is it equivalent of $ so how can i convert it to $ ?
i have searched this thing but it not what i want Converting Hex String to NSData in Swift
i am having the hexValue of $ like string and i have searched that is it equivalent of $ so how can i convert it to $ ?
i have searched this thing but it not what i want Converting Hex String to NSData in Swift
Solved this by doing this
let str = symbol
if let htmldata = str.data(using: String.Encoding.utf8), let attributedString = try? NSAttributedString(data: htmldata, options: [NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType], documentAttributes: nil)
{
let finalString = String(format: "%@",attributedString.string)
return finalString
}
else
{
return ""
}