summaryrefslogtreecommitdiffstats
path: root/misc/bstr.h
diff options
context:
space:
mode:
Diffstat (limited to 'misc/bstr.h')
-rw-r--r--misc/bstr.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/misc/bstr.h b/misc/bstr.h
index 63865a4421..199f300ba1 100644
--- a/misc/bstr.h
+++ b/misc/bstr.h
@@ -80,6 +80,10 @@ double bstrtod(struct bstr str, struct bstr *rest);
void bstr_lower(struct bstr str);
int bstr_sscanf(struct bstr str, const char *format, ...);
+// Decode a string containing hexadecimal data. All whitespace will be silently
+// ignored. When successful, this allocates a new array to store the output.
+bool bstr_decode_hex(void *talloc_ctx, struct bstr hex, struct bstr *out);
+
// Decode the UTF-8 code point at the start of the string, and return the
// character.
// After calling this function, *out_next will point to the next character.