Skip to content

Instantly share code, notes, and snippets.

@lucianoschillagi
Created August 27, 2024 15:45
Show Gist options
  • Save lucianoschillagi/3c2dcba1fab65a68485deb2bee060407 to your computer and use it in GitHub Desktop.
Save lucianoschillagi/3c2dcba1fab65a68485deb2bee060407 to your computer and use it in GitHub Desktop.
Unicode Basic Emojies
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