SwiftUnicodeSupplement
?SwiftUnicodeSupplement
adds some additional functions to Unicode(.Scalar)
.
Although SE-0211 is already implemented in Swift 5.0,
some features (such as IDNAStatus
) implemented in this library may be useful.
import UnicodeSupplement
let a: Unicode.Scalar = "a"
print(a.latestProperties.bidiClass == .leftToRight)
// -> true
print(a.latestProperties.canonicalCombiningClass == .notReordered)
// -> true
print(a.latestProperties.isMath)
// -> false
print(a.latestProperties.isAlphabetic)
// -> true
print(a.latestProperties.generalCategory == .lowercaseLetter)
// -> true
print(a.latestProperties.joiningGroup == .noJoiningGroup)
// -> true
print(a.latestProperties.joiningType == .nonJoining)
// -> true
print(a.latestProperties.script == .latin)
// -> true
print(a.latestProperties.isWhitespace)
// -> false
print(a.latestProperties.isASCIIHexDigit)
// -> true
You can run ./utils/update
to update properties.
MIT License.
See "LICENSE.txt" for more information.
link |
Stars: 0 |
Last commit: 26 weeks ago |
Full Changelog: https://github.com/YOCKOW/SwiftUnicodeSupplement/compare/1.1.1...1.2.0
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics