Struct gh_emoji::Replacer[][src]

pub struct Replacer { /* fields omitted */ }
Expand description

Replaces :emoji: in strings

let r = gh_emoji::Replacer::new();
let unicode_text = r.replace_all("Hello :cat:!");

Implementations

There is some small setup cost

Replaces all occurrences of :emoji_names: in the string

It may return Cow::Borrowed if there were no emoji-like patterns in the string. Call .to_string() if you need String or .as_ref() to get &str.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.