Update README.md
This commit is contained in:
parent
a0bf23e300
commit
433d49cfe2
|
@ -10,6 +10,8 @@ Implementation of [ULID](https://github.com/ulid/spec/blob/master/README.md) in
|
||||||
### Generate ULID
|
### Generate ULID
|
||||||
|
|
||||||
```swift
|
```swift
|
||||||
|
import ULID
|
||||||
|
|
||||||
// Generate ULID using current time
|
// Generate ULID using current time
|
||||||
let ulid = ULID()
|
let ulid = ULID()
|
||||||
|
|
||||||
|
@ -22,6 +24,8 @@ let data: Data = ulid.ulidData
|
||||||
### Parse ULID
|
### Parse ULID
|
||||||
|
|
||||||
```swift
|
```swift
|
||||||
|
import ULID
|
||||||
|
|
||||||
// Parse ULID string
|
// Parse ULID string
|
||||||
let ulid = ULID(ulidString: "01D0YHEWR9WMPY4NNTPK1MR1TQ")!
|
let ulid = ULID(ulidString: "01D0YHEWR9WMPY4NNTPK1MR1TQ")!
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue