hxUnicode

provides data and functions to test some properties of Unicode code points. It's port of golang's unicode
https://github.com/fy0/hx-unicode

To install, run:

haxelib install hxUnicode 0.0.2 

See using Haxelib in Haxelib documentation for more information.

README.md

hx-unicode

Provides data and functions to test some properties of Unicode code points.

It's port of golang's unicode package.

How to use

Use hxUnicode.U.Is to check is a character can match a unicode property.

All RangeTable from golang/unicode package is available.

import hxUnicode.U.Nd;
import hxUnicode.U.Is as UnicodeIs;

function main() {
    // check if is a number \u{Nd}, '1' match, 'A' not match.
    // Note: really want module alaias for haxe.
    trace(UnicodeIs(Nd, '1'.charCodeAt(0)));
    trace(UnicodeIs(Nd, 'A'.charCodeAt(0)));
}

Contribute

Do note edit haxe code. Edit go code.

RangeTables were generated from tools/main.go.

go run tools/main.go

Then use vscode haxe extension to format generated code.

Contributors
fy0
Version
0.0.2
Published
2 years ago
License
MIT

All libraries are free

Every month, more than a thousand developers use Haxelib to find, share, and reuse code — and assemble it in powerful new ways. Enjoy Haxe; It is great!

Explore Haxe

Haxe Manual

Haxe Code Cookbook

Haxe API documentation

You can try Haxe in the browser! try.haxe.org

Join us on GitHub!

Haxe is being developed on GitHub. Feel free to contribute or report issues to our projects.

Haxe on GitHub

⌂