String
extension String- 
                  
                  Returns a copy of the current Stringwhere every character incompatible with HTML Unicode encoding (UTF-16 or UTF-8) is replaced by a decimal HTML entity.ExamplesString Result Format &&Decimal entity (part of the Unicode special characters) ΣΣNot escaped (Unicode compliant) 🇺🇸🇺🇸Not escaped (Unicode compliant) aaNot escaped (alphanumerical) DeclarationSwift public func addingUnicodeEntities() -> String
- 
                  
                  Returns a copy of the current Stringwhere every character incompatible with HTML ASCII encoding is replaced by a decimal HTML entity.ExamplesString Result Format &&Decimal entity ΣΣDecimal entity 🇺🇸🇺🇸Combined decimal entities (extented grapheme cluster) aaNot escaped (alphanumerical) PerformanceIf your webpage is unicode encoded (UTF-16 or UTF-8) use addingUnicodeEntitiesinstead, as it is faster and produces a less bloated and more readable HTML.DeclarationSwift public func addingASCIIEntities() -> String
- 
                  
                  Replaces every HTML entity in the receiver with the matching Unicode character. ExamplesString Result Format &&Keyword entity ΣΣDecimal entity ččHexadecimal entity 🇺🇸🇺🇸Combined decimal entities (extented grapheme cluster) aaNot an entity &&Not an entity DeclarationSwift public func removingHTMLEntities() -> String
 View on GitHub
View on GitHub Install in Dash
Install in Dash String Extension Reference
        String Extension Reference