LeftPad in Swift
The story http://www.theregister.co.uk/2016/03/23/npm_left_pad_chaos/
XCTAssert("foo".leftPad(5) == " foo")
XCTAssert("foobar".leftPad(6) == "foobar")
XCTAssert("hello".leftPad(7, character: "☘") == "☘☘hello")
Khoa Pham, [email protected]
LeftPad is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'LeftPad'
LeftPad is also available through Carthage. To install just write into your Cartfile:
github "onmyway133/LeftPad"
Khoa Pham, [email protected]
We would love you to contribute to LeftPad, check the CONTRIBUTING file for more info.
LeftPad is available under the MIT license. See the LICENSE file for more info.