Snap for 9719949 from 15449292b4636a7ca121bd217f5f198317cb052a to udc-release am: 2499cd7e64

Original change: https://googleplex-android-review.googlesource.com/c/platform/external/rust/crates/unicode-xid/+/21946674

Change-Id: I1f4cac3d1ef6a265436c4846a351f3be694139fa
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
tree: 105ba11fd4b0f188e43f4106db8f315a4c63866c
  1. benches/
  2. patches/
  3. src/
  4. tests/
  5. .cargo_vcs_info.json
  6. .gitignore
  7. Android.bp
  8. Cargo.toml
  9. Cargo.toml.orig
  10. cargo2android.json
  11. COPYRIGHT
  12. LICENSE-APACHE
  13. LICENSE-MIT
  14. METADATA
  15. MODULE_LICENSE_APACHE2
  16. OWNERS
  17. README.md
  18. TEST_MAPPING
README.md

unicode-xid

Determine if a char is a valid identifier for a parser and/or lexer according to Unicode Standard Annex #31 rules.

Build Status

Documentation

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));
}

features

unicode-xid supports a no_std feature. This eliminates dependence on std, and instead uses equivalent functions from core.

changelog

0.2.4

  • Update to Unicode 15.0.0
  • Replace const tables with static tables.

0.2.3

  • Update to Unicode 14.0.0

0.2.2

  • Add an ASCII fast-path

0.2.1

  • Update to Unicode 13.0.0
  • Speed up lookup

0.2.0

  • Update to Unicode 12.1.0.

0.1.0

  • Initial release.