Titanium unicode normalization module for iOS
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
assets
documentation
example
iphone
.gitignore
LICENSE
README.md
screen.png

README.md

TiTextNormalizer for iOS

Titanium unicode normalization module for iOS (Android version is here)

API

normalize(String, Form) : String

var module = require('net.imthinker.ti.textnormalizer');
var text = 'ガオガイガー';
var nfc = module.normalize(text, module.NFC);
var nfd = module.normalize(text, module.NFD);
var nfkc = module.normalize(text, module.NFKC);
var nfkd = module.normalize(text, module.NFKD);

isNormalized(String, Form) : Number

var module = require('net.imthinker.ti.textnormalizer');
var text = 'ガオガイガー';
module.isNormalized(text, module.NFC); // 1
module.isNormalized(text, module.NFD); // 0
module.isNormalized(text, module.NFKC); // 1
module.isNormalized(text, module.NFKD); // 0

Screenshot (console.log)

screen.png

Distribution

See releases page

Example

See example/app.js

License

Apache License, Version 2.0

Copyright 2014 Ryutaro Miyashita

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.