X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=util%2Fstring-util.h;h=8a3ad19eae6e9808a319aec043e78089b792d41e;hb=b547830783ee0732696d5c05a00cfc57baba065f;hp=0194607ee52877b9c1adcfc96933d84aab9658f1;hpb=7c3a995d6b6e066aa68b0adf0433f45cb3812c2a;p=notmuch diff --git a/util/string-util.h b/util/string-util.h index 0194607e..8a3ad19e 100644 --- a/util/string-util.h +++ b/util/string-util.h @@ -19,6 +19,13 @@ char *strtok_len (char *s, const char *delim, size_t *len); +/* Return a talloced string with str sanitized. + * + * Whitespace characters (tabs and newlines) are replaced with spaces, + * non-printable characters with question marks. + */ +char *sanitize_string (const void *ctx, const char *str); + /* Construct a boolean term query with the specified prefix (e.g., * "id") and search term, quoting term as necessary. Specifically, if * term contains any non-printable ASCII characters, non-ASCII