#text #unicode #xid

no-std unicode-xid

Determine whether characters have the XID_Start or XID_Continue properties according to Unicode Standard Annex #31

5 releases

0.1.0 May 8, 2017
0.0.4 Dec 24, 2016
0.0.3 Aug 20, 2015
0.0.2 Jul 9, 2015
0.0.1 Apr 27, 2015

#28 in Text processing

Download history 77341/week @ 2018-12-20 77893/week @ 2018-12-27 103080/week @ 2019-01-03 106833/week @ 2019-01-10 113566/week @ 2019-01-17 107984/week @ 2019-01-24 116885/week @ 2019-01-31 126913/week @ 2019-02-07 123283/week @ 2019-02-14 131212/week @ 2019-02-21 134517/week @ 2019-02-28 132150/week @ 2019-03-07 126493/week @ 2019-03-14 121194/week @ 2019-03-21 128443/week @ 2019-03-28

256,617 downloads per month
Used in 7,897 crates (31 directly)

MIT/Apache

51KB
659 lines

unicode-xid

Determine if a char is a valid identifier for a parser and/or lexer according to Unicode Standard Annex #31 rules.

Build Status

Documentation

extern crate unicode_xid;

use unicode_xid::UnicodeXID;

fn main() {
    let ch = 'a';
    println!("Is {} a valid start of an identifier? {}", ch, UnicodeXID::is_xid_start(ch));
}

features

unicode-xid supports a no_std feature. This eliminates dependence on std, and instead uses equivalent functions from core.

crates.io

You can use this package in your project by adding the following to your Cargo.toml:

[dependencies]
unicode-xid = "0.0.4"

lib.rs:

Determine if a char is a valid identifier for a parser and/or lexer according to Unicode Standard Annex #31 rules.

extern crate unicode_xid;

use unicode_xid::UnicodeXID;

fn main() {
    let ch = 'a';
    println!("Is {} a valid start of an identifier? {}", ch, UnicodeXID::is_xid_start(ch));
}

features

unicode-xid supports a no_std feature. This eliminates dependence on std, and instead uses equivalent functions from core.

crates.io

You can use this package in your project by adding the following to your Cargo.toml:

[dependencies]
unicode-xid = "0.0.4"

No runtime deps