Skip to content

Latest commit

 

History

History
 
 

LeftPad.swift

LeftPad

LeftPad in Swift

CI Status Version Carthage Compatible License Platform

Description

The story http://www.theregister.co.uk/2016/03/23/npm_left_pad_chaos/

Usage

XCTAssert("foo".leftPad(5) == "  foo")
XCTAssert("foobar".leftPad(6) == "foobar")
XCTAssert("hello".leftPad(7, character: "") == "☘☘hello")

Author

Khoa Pham, [email protected]

Installation

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"

Author

Khoa Pham, [email protected]

Contributing

We would love you to contribute to LeftPad, check the CONTRIBUTING file for more info.

License

LeftPad is available under the MIT license. See the LICENSE file for more info.