Crates.io | unicode-id |
lib.rs | unicode-id |
version | 0.3.5 |
source | src |
created_at | 2022-01-29 13:33:10.26505 |
updated_at | 2024-09-19 07:32:58.942722 |
description | Determine whether characters have the ID_Start or ID_Continue properties according to Unicode Standard Annex #31. |
homepage | https://github.com/Boshen/unicode-id |
repository | https://github.com/Boshen/unicode-id |
max_upload_size | |
id | 523617 |
size | 67,471 |
[!IMPORTANT] Try the optimized version unicode-id-start.
Determine if a char
is a valid identifier for a parser and/or lexer according to
Unicode Standard Annex #31 rules.
This is a clone of unicode-xid.
use unicode_id::UnicodeID;
fn main() {
let ch = 'a';
println!("Is {} a valid start of an identifier? {}", ch, UnicodeID::is_id_start(ch));
}
unicode-id supports a no_std
feature. This eliminates dependence
on std, and instead uses equivalent functions from core.