commit | 18ee23b52a060bb0f39c819ef5e30eb224f8cb10 | [log] [tgz] |
---|---|---|
author | Chih-Hung Hsieh <chh@google.com> | Mon Oct 07 12:33:17 2019 -0700 |
committer | android-build-merger <android-build-merger@google.com> | Mon Oct 07 12:33:17 2019 -0700 |
tree | 0d63602442b8632d4e1ce192154dcb2c95a1a01b | |
parent | 3d8e4e26d87e30a713cb6bd9e3cd44b62757553b [diff] | |
parent | 2e20f6a6229104dc14e04ad8e91e39afb092279c [diff] |
Add explicit default 2015. am: 1809e3e889 am: 2e20f6a622 Change-Id: I754bd5591ed28452c565e796dadf7a927a0f47f6
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"