Open ccostin93 opened 3 years ago
Currently, the method EmojiManager.getForTag(String) is case sensitive. I would say this is quite restrictive.
EmojiManager.getForTag(String)
Sure, one can do a call for EmojiManager.getAllTags(), but then one would have to search though all the tags and find what he wants.
EmojiManager.getAllTags()
A simple improvement would be to make the Map storing the emojis by tag to be case insensitive. This can be achieved by changing the HashMap to a TreeMap(CASE_INSENSITIVE) - see https://www.baeldung.com/java-map-with-case-insensitive-keys
@vdurmont WDYT?
Currently, the method
EmojiManager.getForTag(String)
is case sensitive. I would say this is quite restrictive.Sure, one can do a call for
EmojiManager.getAllTags()
, but then one would have to search though all the tags and find what he wants.A simple improvement would be to make the Map storing the emojis by tag to be case insensitive. This can be achieved by changing the HashMap to a TreeMap(CASE_INSENSITIVE) - see https://www.baeldung.com/java-map-with-case-insensitive-keys
@vdurmont WDYT?