diff options
author | yorah <yoram.harmelin@gmail.com> | 2012-07-12 18:31:59 +0400 |
---|---|---|
committer | yorah <yoram.harmelin@gmail.com> | 2012-07-24 16:03:07 +0400 |
commit | 02a0d651d79b2108dd6b894b9a43f7682270ac51 (patch) | |
tree | e90cbe5dccf69913f226799860a541ab31df29c3 /src/util.h | |
parent | 944d250f964698b33d9fa09e2e6af74b1dd84de2 (diff) |
Add git_buf_unescape and git__unescape to unescape all characters in a string (in-place)
Diffstat (limited to 'src/util.h')
-rw-r--r-- | src/util.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h index a84dcab1e..905fc927f 100644 --- a/src/util.h +++ b/src/util.h @@ -238,4 +238,13 @@ extern int git__parse_bool(int *out, const char *value); */ int git__date_parse(git_time_t *out, const char *date); +/* + * Unescapes a string in-place. + * + * Edge cases behavior: + * - "jackie\" -> "jacky\" + * - "chan\\" -> "chan\" + */ +extern size_t git__unescape(char *str); + #endif /* INCLUDE_util_h__ */ |