or delicacies too choice for the manual.
TOC
// | |
// | |
// Adapted from: | |
// | |
// Original: https://gist.github.com/loudmouth/332e8d89d8de2c1eaf81875cfcd22e24 | |
// Adds encoding: https://github.com/3D4Medical/glTFSceneKit/blob/master/Sources/glTFSceneKit/GLTF/JSONCodingKeys.swift | |
// Adds fix for null inside arrays causing infinite loop: https://gist.github.com/loudmouth/332e8d89d8de2c1eaf81875cfcd22e24#gistcomment-2807855 | |
// | |
struct JSONCodingKeys: CodingKey { | |
var stringValue: String |
or delicacies too choice for the manual.
TOC
import Cocoa | |
extension String { | |
// https://stackoverflow.com/a/36258684/2227743 | |
var containsEmoji: Bool { | |
for scalar in self.unicodeScalars { | |
switch scalar.value { | |
case 0x1F600...0x1F64F, // Emoticons | |
0x1F300...0x1F5FF, // Misc Symbols and Pictographs |