Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
bakkenbaeck/SweetSwift
SweetSwift
Table of Contents
Date
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)
String
Easily prepend to a string.
path.prepend("/")
normalizedPath = path.prepending("/")
Int
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!")
}
Installation
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"
License
SweetSwift is available under the MIT license. See the LICENSE file for more info.
Author
Bakken & Bæck, @UseSweet
Github
link |
Stars: 10 |
Last commit: 1 week ago |
You may find interesting
Releases
Support for prepending a string to an existing string - 2019-05-24T09:16:52
- See #33 for more details, thanks to @Elland for the contribution!