Does the icu crate support getting a character's name? #5446
-
I'd like to implement the following function: fn unicode_name(c: char) -> String {
unimplemented!()
}
#[cfg(test)]
mod tests {
use super::unicode_name;
#[test]
fn test_unicode_name {
assert_eq!(unicode_name('a'), "LATIN SMALL LETTER A");
assert_eq!(unicode_name('μ'), "GREEK SMALL LETTER MU");
assert_eq!(unicode_name('→'), "RIGHTWARDS ARROW");
assert_eq!(unicode_name('\x08'), "BACKSPACE");
}
} I was hoping that the Thanks in advance for any help. |
Beta Was this translation helpful? Give feedback.
Answered by
Manishearth
Aug 23, 2024
Replies: 1 comment 2 replies
-
I don't think we have this API but yes, having names support in |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
jake-low
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I don't think we have this API but yes, having names support in
icu_properties
would be in-scope