#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

#1 in Text processing

Download history 67560/week @ 2018-05-27 82930/week @ 2018-06-03 84068/week @ 2018-06-10 73086/week @ 2018-06-17 79383/week @ 2018-06-24 82991/week @ 2018-07-01 82016/week @ 2018-07-08 89539/week @ 2018-07-15 93582/week @ 2018-07-22 85511/week @ 2018-07-29 81219/week @ 2018-08-05 75530/week @ 2018-08-12 70119/week @ 2018-08-19

256,617 downloads per month
Used in 4,793 crates (24 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