Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I generate fixed length UUIDs? #2

Open
srix55 opened this issue Aug 18, 2021 · 0 comments
Open

How do I generate fixed length UUIDs? #2

srix55 opened this issue Aug 18, 2021 · 0 comments

Comments

@srix55
Copy link

srix55 commented Aug 18, 2021

First, thanks for a useful handy tool.
I looked into passing the shortIdLength with PaddingParams in init like this

var uuid = ShortUuid.init(null, PaddingParams(shortIdLength: 8, consistentLength: true)).generate();
// 9qeHdUATPWNq4yca7ixD1G

This still generates a long UUID. Any way I can fix up the length?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant