SkillAgentSearch skills...

DecodeHTML

A String extension to decode HTML entities to string

Install / Use

/learn @flowbe/DecodeHTML
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

DecodeHTML

Simply convert HTML to readable strings or attributed string in Swift!

Installation

Installation can be done via Swift Package Manager or by dragging Sources/DecodeHTML into your project.

dependencies: [
    .package(url: "https://github.com/flowbe/DecodeHTML.git", .upToNextMajor(from: "1.0.0"))
]

Usage

This package adds 2 properties to String.

  • htmlToString:
let myHtmlString = "C’est la France"
print("\(myHtmlString.htmlToString)") // prints "C'est la France"
  • htmlToAttributedString:
let myHtmlString = "C’est la France"
let label = UILabel()
label.attributedText = myHtmlString.htmlToAttributedString

Related Skills

View on GitHub
GitHub Stars16
CategoryDevelopment
Updated5y ago
Forks1

Languages

Swift

Security Score

75/100

Audited on Mar 1, 2021

No findings