Skip to content

levmv/emoji

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

emoji remover

Go Go Report Card

Simple library to remove all emoji from string.

Basic Usage

import "github.com/levmv/emoji"

// Remove emojis from string
text := "I love coding! 🚀💻"
result := emoji.Remove([]byte(text))
// result: "I love coding! "

Performance

  • 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

Important Considerations

  • 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(but 0xfe0f rune removed if present).

About

Fast and efficient emoji removal

Resources

License

Stars

5 stars

Watchers

1 watching

Forks

Contributors

Languages