Created
August 27, 2024 15:45
-
-
Save lucianoschillagi/3c2dcba1fab65a68485deb2bee060407 to your computer and use it in GitHub Desktop.
Unicode Basic Emojies
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Cocoa | |
func printBasicEmojies() { | |
let startScalar = 0x1F600 | |
let endScalar = 0x1F64F | |
// Iterate over the range and print each character | |
for scalarValue in startScalar...endScalar { | |
if let scalar = UnicodeScalar(scalarValue) { | |
let character = String(scalar) | |
print("\(scalarValue): \(character)") | |
} else { | |
print("\(scalarValue): Invalid scalar") | |
} | |
} | |
} | |
printBasicEmojies() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment