* mu-output.c, mu-str.[ch]: fix escaping for JSON, sexps (add mu_str_escape_c_literal)

This commit is contained in:
Dirk-Jan C. Binnema
2011-01-06 13:55:16 +02:00
parent cafba1327f
commit f8af665151
3 changed files with 33 additions and 3 deletions

View File

@ -221,6 +221,16 @@ time_t mu_str_date_parse_hdwmy (const char* str);
const char* mu_str_fullpath_s (const char* path, const char* name);
/**
* escape a string like a string literal in C; ie. replace \ with \\,
* and " with \"
*
* @param str a non-NULL str
*
* @return the escaped string, newly allocated (free with g_free)
*/
char* mu_str_escape_c_literal (const gchar* str);
G_END_DECLS
#endif /*__MU_STR_H__*/