Swiftpack.co -  YOCKOW/SwiftUnicodeSupplement as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
YOCKOW/SwiftUnicodeSupplement
Unicode Supplement for Swift.
.package(url: "https://github.com/YOCKOW/SwiftUnicodeSupplement.git", from: "1.0.1")

What is 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.

Requirements

  • Swift 5 (including compatibility mode for Swift 4 or 4.2)
  • macOS or Linux

Usage

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

Update

You can run ./utils/update to update properties.

License

MIT License.
See "LICENSE.txt" for more information.

GitHub

link
Stars: 0
Last commit: 4 weeks ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Dependencies

Release Notes

Release v1.0.0
1 year ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API