]> git.ozlabs.org Git - ccan/blobdiff - ccan/json_escape/json_escape.h
json_escape: add fast-path for when we don't need to escape.
[ccan] / ccan / json_escape / json_escape.h
index b8e0dfca1d41e3042a1477343c8e3259760879c1..5b33432f8fce768dc53b77ebeaf068a03d567fc9 100644 (file)
@@ -27,7 +27,8 @@ struct json_escape *json_escape_len(const tal_t *ctx,
 struct json_escape *json_partial_escape(const tal_t *ctx,
                                         const char *str TAKES);
 
-/* Extract a JSON-escaped string. */
+/* Do we need to escape this str? */
+bool json_escape_needed(const char *str, size_t len);
 
 /* Are two escape json strings identical? */
 bool json_escape_eq(const struct json_escape *a,