Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/knu/ruby-unf
A wrapper library to bring Unicode Normalization Form support to Ruby/JRuby
https://github.com/knu/ruby-unf
Last synced: about 2 months ago
JSON representation
A wrapper library to bring Unicode Normalization Form support to Ruby/JRuby
- Host: GitHub
- URL: https://github.com/knu/ruby-unf
- Owner: knu
- License: bsd-2-clause
- Created: 2011-10-24T13:45:30.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2023-02-04T14:29:34.000Z (over 1 year ago)
- Last Synced: 2024-05-12T00:07:35.264Z (4 months ago)
- Language: Ruby
- Homepage:
- Size: 134 KB
- Stars: 75
- Watchers: 7
- Forks: 9
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
ruby-unf
========Synopsis
--------* A wrapper library to bring Unicode Normalization Form support to Ruby/JRuby
Description
-----------* Uses `unf_ext` on CRuby and `java.text.Normalizer` on JRuby.
* Normalizes UTF-8 strings into and from NFC, NFD, NFKC or NFKD
# For bulk conversion
normalizer = UNF::Normalizer.instance
a_bunch_of_strings.map! { |string|
normalizer.normalize(string, :nfc) #=> string in NFC
}# Class method
UNF::Normalizer.normalize(string, :nfc)# Instance methods of String
string.to_nfcInstallation
------------gem install unf
License
-------Copyright (c) 2011, 2012, 2013 Akinori MUSHA
Licensed under the 2-clause BSD license.
See `LICENSE` for details.