* add mu_str_replace

This commit is contained in:
djcb
2013-05-26 11:16:02 -07:00
parent 52d89bd1f8
commit 3dae623879
3 changed files with 75 additions and 0 deletions

View File

@ -75,6 +75,21 @@ char *mu_str_display_contact (const char *str) G_GNUC_WARN_UNUSED_RESULT;
const char* mu_str_size_s (size_t s) G_GNUC_CONST;
char* mu_str_size (size_t s) G_GNUC_WARN_UNUSED_RESULT;
/**
* Replace all occurences of substr in str with repl
*
* @param str a string
* @param substr some string to replace
* @param repl a replacement string
*
* @return a newly allocated string with the substr replaced by repl; free with g_free
*/
char *mu_str_replace (const char *str, const char *substr, const char *repl);
/**
* get a display string for a given set of flags, OR'ed in
* @param flags; one character per flag:
@ -326,6 +341,7 @@ const gchar* mu_str_subject_normalize (const gchar* str);
*/
gchar* mu_str_quoted_from_strv (const gchar **params);
/** @} */
G_END_DECLS