Swift Package Index

HTMLSpecialCharacters

https://github.com/sonsongithub/HTMLSpecialCharacters.git

Library to escape/unescape HTML special characters in Swift.


Compatibility

  • 1.4.0 and master
    5.3
    5.2
    5.1
    5.0
    4.2
  • 1.4.0 and master
    iOS
    macOS(Intel)
    macOS(ARM)
    Linux
    tvOS
    watchOS

HTMLSpecialCharacters

Library to escape/unescape HTML special characters in Swift. Google Toolbox for Mac is known as a great library which supports escaping/unescaping HTML special characters. But it's written in Objective-C.

Test code

HTMLSpecialCharacters passed the alomost same test code of Google Toolbox for Mac. Please check it.

Performance

HTMLSpecialCharacters can escape/unescape HTML special chracters much faster than Google Toolbox for Mac. The figure below shows the performance of escaping/unescaping the test code. These score were measured on iMac (27-inch Late 2012). Test code for Google Toolbox for Mac is here.

Acknowledgement

@norio_nomura gave me a lot of codes and comments. This project is based on his code.

License

MIT License. This library includes source codes of Google Toolbox for Mac.