Swiftpack.co - soffes/Base62 as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by soffes.
soffes/Base62 v0.2.0
Swift base62 library
⭐️ 8
🕓 2 years ago
.package(url: "https://github.com/soffes/Base62.git", from: "v0.2.0")

Base62

Swift Base62 library.

Usage

Simply import the library and you're good to go.

import Base62

encode(integer: 123) // "1z"
decode(string: "funky") // 619367412

If you prefer, you can use Base62.encode instead of just encode.

It’s worth noting that you can’t decode an string with a value greater than Int.max.

Thanks

Thanks to the base62 gem for a reference implementation.

GitHub

link
Stars: 8
Last commit: 2 years ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Related Packages

Release Notes

Version 0.2.0
2 years ago

Update for Swift 5.5

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics