-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
Does anyone actually use the SetCharacters method? #18
Comments
I used SetCharacters in one of the project to generate uppercased+number only shortid string shortIdCharacters = "ABCDEFGHIJKLMNOPQRSTUVWXQYZ1234567890";
ShortId.SetCharacters(shortIdCharacters);
var opts = new GenerationOptions
{
UseSpecialCharacters = false,
UseNumbers = true,
Length = 12
};
ShortId.Generate(opts); |
@svenbit This doesn't work, the library throws an InvalidOperationException saying The replacement characters must be at least 50 letters in length and without whitespace. I'd like to generate uppercase letters only + digits. Any ideas? |
@inexuscore the limitation was added in version 3.0.0 to improve uniqueness of generated ids. If you want to limit the character set then you can use version 2.0.4 |
@bolorundurowb ah I see, that's what I thought. Thank you very much, I'll stick with the latest version. Better to have more uniqueness than unreliable IDs. |
@inexuscore I am using something like this:
Only numbers. length 12 and dash in the middle. |
@djordjedjukic brilliant, thank you. |
If it is not in use, then we can consider removing it in the next major release
The text was updated successfully, but these errors were encountered: