Skip to main content

strip_mention

Function strip_mention 

Source
pub fn strip_mention(prompt: &str) -> String
Expand description

Strip the first @mention from a prompt, returning the cleaned text.

If the mention is at the start of the prompt, leading whitespace after it is also trimmed. If the mention is mid-prompt, only the @slug token is removed and surrounding whitespace is collapsed.