Swiftpack.co - YOCKOW/SwiftUnicodeSupplement as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by YOCKOW.
YOCKOW/SwiftUnicodeSupplement 1.4.0
Unicode Supplement for Swift.
⭐️ 0
🕓 29 weeks ago
.package(url: "https://github.com/YOCKOW/SwiftUnicodeSupplement.git", from: "1.4.0")

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: 29 weeks ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Dependencies

Release Notes

Release v1.4.0.
29 weeks ago

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