diff options
| author | Edward Thomson <ethomson@edwardthomson.com> | 2018-03-03 18:47:35 +0000 |
|---|---|---|
| committer | Edward Thomson <ethomson@edwardthomson.com> | 2018-03-19 16:08:01 -0700 |
| commit | 8070a357fb6e1dc60a65a2281c932f71bbbd65d6 (patch) | |
| tree | aed208532182335c9af31ab545b606159f00569c /src/buffer.h | |
| parent | 30333e820ed170e7290045abd3213ea6a5e60efa (diff) | |
| download | libgit2-8070a357fb6e1dc60a65a2281c932f71bbbd65d6.tar.gz | |
Introduce `git_buf_decode_percent`
Introduce a function to take a percent-encoded string (URI encoded,
described by RFC 1738) and decode it into a `git_buf`.
Diffstat (limited to 'src/buffer.h')
| -rw-r--r-- | src/buffer.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/buffer.h b/src/buffer.h index b0aece488..cc77fc030 100644 --- a/src/buffer.h +++ b/src/buffer.h @@ -190,6 +190,9 @@ int git_buf_encode_base85(git_buf *buf, const char *data, size_t len); /* Decode the given "base85" and write the result to the buffer */ int git_buf_decode_base85(git_buf *buf, const char *base64, size_t len, size_t output_len); +/* Decode the given percent-encoded string and write the result to the buffer */ +int git_buf_decode_percent(git_buf *buf, const char *str, size_t len); + /* * Insert, remove or replace a portion of the buffer. * |
