Is there a way to use the Unicode tables in the Rust regex crate to match a single char without turning it into a String or &str? It seems like the internals must have a way to do this, but perhaps not exposed? Is there a trick?
Replying to @wycats
Internal tables are definitely not exposed. The quickest "trick" I can think of is to ignore your requirement. :-) Namely, use https://doc.rust-lang.org/std/primitive.char.html#method.encode_utf8 … to turn a `char` into a `&str`, which can be done without an alloc, and then match against regex.
4:19 AM - 6 Apr 2018
0 replies
0 retweets
1 like
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.