commit | 20a42e4cf7c34b2126fd35b8c2c9a7d5df0680cd | [log] [tgz] |
---|---|---|
author | Android Build Role Account android-build-prod <android-build-team-robot@google.com> | Sun Nov 10 11:02:44 2019 +0000 |
committer | Android Build Role Account android-build-prod <android-build-team-robot@google.com> | Sun Nov 10 11:02:44 2019 +0000 |
tree | 0d63602442b8632d4e1ce192154dcb2c95a1a01b | |
parent | 2230bb17040cbd8701b5b44f29569b44a3a0b46f [diff] | |
parent | 686c527ca74075e8e1b256654f68947bd8cfd4f0 [diff] |
Snap for 5999261 from 686c527ca74075e8e1b256654f68947bd8cfd4f0 to r-keystone-qcom-release Change-Id: I91ce0cd24ad007a23eb8fcc0c71f6711174da598
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"