commit | b19d248e01edcddbd2c8b298b268cd7439552a8a | [log] [tgz] |
---|---|---|
author | Chih-Hung Hsieh <chh@google.com> | Mon Apr 06 10:29:08 2020 -0700 |
committer | Chih-Hung Hsieh <chh@google.com> | Mon Apr 06 10:33:12 2020 -0700 |
tree | 62a6df7bb6411078a96e5a31283c3bad84838b84 | |
parent | cf753a46fb93fc857286949e937c13e6ea2c5d85 [diff] |
Add OWNERS to unicode-xid Test: make Change-Id: I79be8a11ae2e9cdb633a309ffbbe3091c71e06d3
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)); }
unicode-xid supports a no_std
feature. This eliminates dependence on std, and instead uses equivalent functions from core.
You can use this package in your project by adding the following to your Cargo.toml
:
[dependencies] unicode-xid = "0.1.0"