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

Consider ignoreWhitespace=true parameter to decodeHex #1433

Open
JakeWharton opened this issue Feb 14, 2024 · 1 comment
Open

Consider ignoreWhitespace=true parameter to decodeHex #1433

JakeWharton opened this issue Feb 14, 2024 · 1 comment

Comments

@JakeWharton
Copy link
Member

Hex often shows up with visual whitespace (spaces, newlines, tabs). I can preprocess it, and I do, but I've just copied that helper function to my third project.

I think this would be a pragmatic inclusion.

One caveat is that this would probably be a conditional that selected two mostly different implementations of the decoding due to how the current one works.

@swankjesse
Copy link
Member

I’m also sad we did a bad job of being consistent with hex and base64. Hex is strict and throws; base64 is lenient and returns null. Whoops!

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

2 participants