Added by-name unicode selection.
@@ -47,3 +47,19 @@ char_property_functions! {
TITLECASE_LETTER, UNASSIGNED, UPPERCASE_LETTER,
];
}
+
+pub fn by_name(name: &str) -> Option<Box<Fn(char) -> bool>> {println!("{:?}", name);
+ for property in binary::BY_NAME {
+ if name == property.0.to_uppercase() {
+ return Some(Box::new(move |c| property.1.contains_char(c)));
+ }
+ }
+
+ for property in category::BY_NAME {
+ if name == property.0.to_uppercase() {
+ return Some(Box::new(move |c| property.1.contains_char(c)));
+ }
+ }
+
+ None
+}
