mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
16 lines
313 B
Swift
16 lines
313 B
Swift
|
|
//
|
||
|
|
// Character.swift
|
||
|
|
// Meshtastic
|
||
|
|
//
|
||
|
|
// Copyright(c) Garth Vander Houwen 4/25/23.
|
||
|
|
//
|
||
|
|
|
||
|
|
import Foundation
|
||
|
|
|
||
|
|
extension Character {
|
||
|
|
var isEmoji: Bool {
|
||
|
|
guard let scalar = unicodeScalars.first else { return false }
|
||
|
|
return scalar.properties.isEmoji && (scalar.value >= 0x203C || unicodeScalars.count > 1)
|
||
|
|
}
|
||
|
|
}
|