I have no idea how to tackle this, Iโve tried searching Google and DevForum and couldnโt find an answer to my problem. If anyone has any suggestions, that would be great! Thank you!
I just found this in stack overflow and tested it in Studio, and it does detect if an emoji is in a string.
function starts_with_emoji(s)
if not s:match("[%w]+") and s:find"^\xF0\x9F[\x8C-\x9B]" or s:find"^\xE2[\x98-\x9F]" then
return true
else
return false
end
end
I fixed the code now. When there are only emojis, it will return true, but when there is an emoji first, then text together, it will return false, and if it is text alone, it will also return false.
it did not format right in this post i edited it in the last one.