commit | 548d586410aadf9c427aa8e36adc8f890889a246 | [log] [tgz] |
---|---|---|
author | Chih-Hung Hsieh <[email protected]> | Mon Oct 07 12:40:14 2019 -0700 |
committer | android-build-merger <[email protected]> | Mon Oct 07 12:40:14 2019 -0700 |
tree | 0d63602442b8632d4e1ce192154dcb2c95a1a01b | |
parent | 5f7d662d8b7a50ac99d4b2c2e853d5a97882400b [diff] | |
parent | 18ee23b52a060bb0f39c819ef5e30eb224f8cb10 [diff] |
Add explicit default 2015. am: 1809e3e889 am: 2e20f6a622 am: 18ee23b52a Change-Id: I09e1005a62e8a8076dd99b1ad8d960f47bcd47dd
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"