软件简介

DecodeHTML.swift 是解码 HTML 条目到字符串的字符串扩展。

htmlToString

let myHtmlString = "C’est la France"
println("\(myHtmlString.htmlToString)") // prints "C'est la France"

htmlToNSAttributedString

let myHtmlString = "C’est la France"
let label = UILabel()
label.attributedText = myHtmlString.htmlToNSAttributedString


转载自: https://www.oschina.net/p/decodehtml-swift