#text #unicode #xid

no-std unicode-xid

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

7 releases

Uses old Rust 2015

0.2.1 Jun 24, 2020
0.2.0 Jul 25, 2019
0.1.0 May 8, 2017
0.0.4 Dec 24, 2016
0.0.1 Apr 27, 2015

#213 in Text processing

Download history 357664/week @ 2020-12-25 494657/week @ 2021-01-01 578691/week @ 2021-01-08 543646/week @ 2021-01-15 584809/week @ 2021-01-22 605666/week @ 2021-01-29 656070/week @ 2021-02-05 671381/week @ 2021-02-12 698032/week @ 2021-02-19 684511/week @ 2021-02-26 679884/week @ 2021-03-05 699654/week @ 2021-03-12 731932/week @ 2021-03-19 751691/week @ 2021-03-26 673532/week @ 2021-04-02 612665/week @ 2021-04-09

2,443,317 downloads per month
Used in 28,630 crates (71 directly)

MIT/Apache

56KB
1.5K SLoC

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.

changelog

0.2.0

  • Update to Unicode 12.1.0.

0.1.0

  • Initial release.

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.

No runtime deps

Features

  • bench
  • no_std