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

Implement the new simplified/improved algorithm #20

Merged
merged 7 commits into from
Sep 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,14 @@ var sqids = new SqidsEncoder();
#### Single number:

```cs
string id = sqids.Encode(1); // "UfB"
string id = sqids.Encode(1); // "Uk"
int number = sqids.Decode(id).Single(); // 1
```

#### Multiple numbers:

```cs
string id = sqids.Encode(1, 2, 3); // "8QRLaD"
string id = sqids.Encode(1, 2, 3); // "86Rf07"
int[] numbers = sqids.Decode(id); // new[] { 1, 2, 3 }
```

Expand Down Expand Up @@ -112,7 +112,7 @@ var sqids = new SqidsEncoder<int>(new()
> It's recommended that you at least provide a shuffled alphabet when using Sqids — even if you want to use the same characters as those in the default alphabet — so that your IDs will be unique to you. You can use an online tool like [this one](https://codebeautify.org/shuffle-letters) to do that.

> **Warning**
> Sqids needs an alphabet that contains at least 5 unique characters.
> The alphabet needs to contain at least 3 unique characters.

#### Minimum Length:

Expand Down
Loading