From c74a91deaa5de416237c02bbb3e41bda76ca4c7b Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Tue, 27 Nov 2018 21:35:56 +0100 Subject: support: Implement support_quote_string Reviewed-by: Jonathan Nieder --- support/support.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'support/support.h') diff --git a/support/support.h b/support/support.h index 9418cd1..835e717 100644 --- a/support/support.h +++ b/support/support.h @@ -69,6 +69,11 @@ void support_write_file_string (const char *path, const char *contents); the result). */ char *support_quote_blob (const void *blob, size_t length); +/* Quote the contents of the at STR, in such a way that the result + string can be included in a C literal (in single/double quotes, + without putting the quotes into the result). */ +char *support_quote_string (const char *str); + /* Returns non-zero if the file descriptor is a regular file on a file system which supports holes (that is, seeking and writing does not allocate storage for the range of zeros). FD must refer to a -- cgit v1.1