commit | 4c3a5251cf3fb0bc779510281cc23be40776a765 | [log] [tgz] |
---|---|---|
author | android-build-team Robot <[email protected]> | Tue Dec 08 03:24:12 2020 +0000 |
committer | Automerger Merge Worker <[email protected]> | Tue Dec 08 03:24:12 2020 +0000 |
tree | f797216b35764bd1fe77fe7a569c9992241a6048 | |
parent | 5a5391ab03ee8a6ec4560f2a579498c05e58857d [diff] | |
parent | ef9d648474afb94f9ed58d5da7db6dec2a1aaa5f [diff] |
Snap for 6948038 from 70a3956fac7f16539576dd3863ad96186f00459e to rvc-platform-release am: ef9d648474 Original change: https://googleplex-android-review.googlesource.com/c/platform/external/rust/crates/unicode-xid/+/12978972 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I4c7e511dcd29b62163bbf0225b4212b27e0a1aa9
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"