Some Utilities to be used by Swift programs.
🕓 2 days ago
.package(url: "https://github.com/stefanspringer1/SwiftUtilities.git", from: "0.0.170")
This is a collection of some Swift utilities.
Add the package in Package.swift:
.package(url: "https://github.com/stefanspringer1/SwiftUtilities", from: "...my minimal version..."),
Add as dependency of the target:
.product(name: "Utilities", package: "SwiftUtilities"),
import statement in the source code:
Build the API documentation using DocC, e.g. in Xcode via the
Build Documentation command. But in the current state of DocC, that documentation will not document any extensions[^1], so currently you need to look the extensions up in the code. In the overview below it is noted which types are extended.
[^1]: see the Swift issue SR-15410
- AutoreleasepoolShim.swift: Allowing you the use of auto-release pools to optimize memory footprint on Darwin platforms while maintaining compatibility with Linux where this API is not implemented (and not necessary).
- CharacterUtilities.swift: Some definitions to be useful when working with characters, e.g. for characterizing them. Contains extensions of
- DataTypes.swift: Definitons of some helpful data types.
- Errors.swift: Definition of a basic error with desription, and of the usefule operator
- FileUtilities.swift: Some definitions to be useful when working with files, e.g.
URL.files(withPattern:findRecursively:) to find files. Contains extensions of
- Lengths.swift: Some definitions useful when working with lengths (e.g. in layouts).
- Process.swift: Definitions useful for running external programs.
- Properties.swift: Some definitions for working with key-value properties lists in files.
- SequenceUtilities.swift: Definitions useful when working with sequences. Contains extensions of
- StringUtilities.swift: Definitions useful when working with string and substrings. Contains extensions of
- SystemUtilities.swift: Some definitions useful e.g. to find out about the current platform.
- TimeUtilities.swift: Some definitions useful when working with time, e.g. for measuring durations.