commit | 3065fab46f072f67dd053da0d2c017638576e855 | [log] [tgz] |
---|---|---|
author | Chih-Hung Hsieh <chh@google.com> | Mon Oct 07 12:47:05 2019 -0700 |
committer | android-build-merger <android-build-merger@google.com> | Mon Oct 07 12:47:05 2019 -0700 |
tree | 0d63602442b8632d4e1ce192154dcb2c95a1a01b | |
parent | 1aa4cc3756db5ea4ff01b5800a5197f75249276a [diff] | |
parent | 548d586410aadf9c427aa8e36adc8f890889a246 [diff] |
Add explicit default 2015. am: 1809e3e889 am: 2e20f6a622 am: 18ee23b52a am: 548d586410 Change-Id: I62471d7cb38066822dc1d29a66d1f24372b6572c
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"