commit | 6767cb6c7411395ce736b966f23d4e24a230b779 | [log] [tgz] |
---|---|---|
author | Xin Li <delphij@google.com> | Wed Oct 30 11:48:36 2019 -0700 |
committer | Xin Li <delphij@google.com> | Wed Oct 30 11:48:36 2019 -0700 |
tree | 32b3c34db61ae50756c47cee698fe29a6f0e8ba7 | |
parent | ee54c10885f81df2cad3ca3c87197a9650de5cb4 [diff] | |
parent | 5f7d662d8b7a50ac99d4b2c2e853d5a97882400b [diff] |
DO NOT MERGE - qt-qpr1-dev-plus-aosp-without-vendor@5915889 into stage-aosp-master Bug: 142003500 Change-Id: Ib854bd4172de3338f95b02c0bbd78b23875a218e
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"