tvl-depot/users/sterni/nix
sterni a5f2b446aa feat(sterni/nix/url): implement urldecoding
We use builtins.split directly as it should be a bit more efficient as
lib.splitStrings. Also its returning of a list for every regex match is
useful to update the state while parsing the tokens:

* The tokens are obtained by splitting the string at every '%'
* Everytime we see a boundary (that is a list in the returned
  list of builtins.split), we know that the first two chars of
  the next string are a percent encoded character.

One implementation flaw is that it will currently crash if it encounters
mal-formed URLs (since int.fromHex chrashes if it encounters any non
hex digit characters) and accepts some malformed urlencoding like
"foo %A".

Change-Id: I90d08d7a71b16b4f4a4879214abd7aeff46c20c8
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2744
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2021-04-01 13:09:46 +00:00
..
char feat(users/sterni/nix): add sternis nix lib 2021-03-01 17:34:35 +00:00
flow feat(users/sterni/nix/flow): add switch conditional 2021-03-05 11:07:41 +00:00
fun feat(users/sterni/nix/fun): make lrs read left to right completely 2021-03-05 11:07:41 +00:00
int feat(users/sterni/nix/utf8): pure nix utf-8 decoder 2021-03-05 11:07:41 +00:00
string refactor(users/sterni/nix/string): don't calculate length for drop 2021-03-05 11:07:41 +00:00
url feat(sterni/nix/url): implement urldecoding 2021-04-01 13:09:46 +00:00
utf8 feat(users/sterni/nix/utf8): pure nix utf-8 decoder 2021-03-05 11:07:41 +00:00