Easily break down a date into components with our helper method:
let date = Date()
date.components([.hour, .day, .year])
Or create a new date with the day/month/year and optional hour/minute/second components:
let date = Date.from(day: 22, month: 1, year: 2018)
Easily prepend to a string.
path.prepend("/")
normalizedPath = path.prepending("/")
Create arrays of a number of things:
5.map { "Hello" }
// returns [ "Hello", "Hello", "Hello", "Hello", "Hello" ]
or run a given operation a number of times:
5.times {
print("Swift is awesome!")
}
SweetSwift is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'SweetSwift' , '~> 2'
SweetSwift is also available through Carthage. To install it, simply add the following line to your Cartfile:
github "BakkenBaeck/SweetSwift"
SweetSwift is available under the MIT license. See the LICENSE file for more info.
Bakken & Bæck, @UseSweet
link |
Stars: 10 |
Last commit: 3 years ago |
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics