MCPcopy
hub / github.com/Textualize/rich / replace

Method replace

rich/emoji.py:53–62  ·  view source on GitHub ↗

Replace emoji markup with corresponding unicode characters. Args: text (str): A string with emojis codes, e.g. "Hello :smiley:!" Returns: str: A string with emoji codes replaces with actual emoji.

(cls, text: str)

Source from the content-addressed store, hash-verified

51
52 @classmethod
53 def replace(cls, text: str) -> str:
54 """Replace emoji markup with corresponding unicode characters.
55
56 Args:
57 text (str): A string with emojis codes, e.g. "Hello :smiley:!"
58
59 Returns:
60 str: A string with emoji codes replaces with actual emoji.
61 """
62 return _emoji_replace(text)
63
64 def __repr__(self) -> str:
65 return f"<emoji {self.name!r}>"

Callers 15

test_replaceFunction · 0.80
test_variantFunction · 0.80
render_logFunction · 0.80
__rich__Method · 0.80
escapeFunction · 0.80
_get_signatureMethod · 0.80
_titleMethod · 0.80
_subtitleMethod · 0.80
__rich_console__Method · 0.80
escape_textMethod · 0.80

Calls 1

_emoji_replaceFunction · 0.90

Tested by 4

test_replaceFunction · 0.64
test_variantFunction · 0.64
render_logFunction · 0.64