view src/lib/strescape.h @ 896:21ffcce83c70 HEAD

Rewrote rfc822-tokenize.c to work one token at a time so it won't uselessly take memory, maybe also a bit faster. This caused pretty large changes all around. Also moved all string (un)escaping code to lib/strescape.c.
author Timo Sirainen <tss@iki.fi>
date Fri, 03 Jan 2003 17:57:12 +0200
parents
children 0d5be52d7131
line wrap: on
line source

#ifndef __STRESCAPE_H
#define __STRESCAPE_H

#define IS_ESCAPED_CHAR(c) ((c) == '"' || (c) == '\\')

/* escape all '\' and '"' characters */
const char *str_escape(const char *str);

/* remove all '\' characters, append to given string */
void str_append_unescaped(String *dest, const char *src, size_t src_size);

/* remove all '\' characters */
void str_unescape(char *str);

#endif