I am trying to replace certain emojis with some text.
I thought it might be a good idea to iterate over each char in a string and match the unicode sequences I want to replace.
But when I try to itreate over a String I always end up with each single codepoint of an emoji, is there a way to get them as a whole?
for ex. 'hello🇸🇹123' to ['h', 'e', 'l', 'l', 'o', '\u{1F1F8}\u{1F1F9}', 't', 'e', 's', 't']
//for c in UnicodeSegmentation::graphemes(s.as_str(), true).collect::<Vec<&str>>() {
for c in s.graphemes(false).collect::<Vec<&str>>() {
println!("_{}_", &c);
}