strescape.h revision 6ea49f0ffe92ac0d709ac9282e136a94df0053ee
#ifndef STRESCAPE_H
#define STRESCAPE_H
/* escape all '\', '"' and "'" characters */
const char *str_escape(const char *str);
/* remove all '\' characters, append to given string */
/* remove all '\' characters */
char *str_unescape(char *str);
/* Remove all '\' chars from str until '"' is reached and return the unescaped
string. *str is updated to point to the character after the '"'. Returns 0
if ok, -1 if '"' wasn't found. */
/* For Dovecot's internal protocols: Escape \001, \t, \r and \n characters
using \001. */
const char *str_tabescape(const char *str);
char *str_tabunescape(char *str);
const char *t_str_tabunescape(const char *str);
const char *const *t_strsplit_tabescaped(const char *str);
#endif