Simple library to remove all emoji from string.
import "github.com/levmv/emoji"
// Remove emojis from string
text := "I love coding! 🚀💻"
result := emoji.Remove([]byte(text))
// result: "I love coding! "- Time Complexity: O(n)
- Memory Usage: ~1KB static lookup tables
- Memory Efficiency: When no emojis are found, returns the original slice.
- UTF-8 Optimized: Direct byte parsing, no rune conversion
-
The input must be valid UTF-8. This is by design - emoji removal is typically not the first text processing step, so the string should already be validated.
-
©️,®️and™️are not considered emojis and will be preserved(but0xfe0frune removed if present).