Is it an emoji?
Emojicode, 179 bytes
a➡na◀n 9728▶n 10175◀n 65024▶n 65039◀n 127744▶n 128591◀n 128640▶n 12876701
A callable that takes a list of integers representing the codepoints and returns 1 or 0.
Try it online!
Emojicode, 187 bytes
a➡iani◀n 9728▶n 10175◀n 65024▶n 65039◀n 127744▶n 128591◀n 128640▶n 128767
A callable that takes a string and returns a boolean.
Try it online!
Ungolfed and explained
A callable that takes a called input and returns a
input ➡
For each character in input
character input
Create a frozen called n containing the unicode codepoint of character
n character
If the value is in one of specific ranges, return (if the current character is not an emoji)
◀n 9728▶n 10175◀n 65024▶n 65039◀n 127744▶n 128591◀n 128640▶n 128767
Since we're here, all characters are an emoji, so return
Try it online!
Ruby, 61 56+1 = 62 57 47 bytes
Uses the -n
flag and takes input from STDIN. Prints 0
for truthy and nil
for falsy.
-5 bytes because for some reason I initially thought the regex solution would not work???
-10 bytes from NieDzejkob for noticing a code point overlap that I missed :o
p$_=~/^[--☀-➿︀-︀️]*$/
Try it online!