From 10a77c7a1c4648693ded958d6ac8641afcdf1d34 Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Wed, 25 Feb 2009 21:25:18 +0100 Subject: The Ultimate Entity Solution (tm) --- gallery-utils.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'gallery-utils.h') diff --git a/gallery-utils.h b/gallery-utils.h index dd97663..53c82c0 100644 --- a/gallery-utils.h +++ b/gallery-utils.h @@ -24,10 +24,9 @@ /* * str_replace: replace substring 'search' with a 'replace' string * - multiple occurences of the string are replaced - * - specify 'exclude_when' if you want to skip replace when a string found at the place of 'search' * - reallocates the original string */ -void str_replace (char **dst, const char *search, const char *replace, const char *exclude_when); +void str_replace (char **dst, const char *search, const char *replace); /* * copy_file: copy file from src to dst @@ -45,3 +44,10 @@ char *make_string (const char* substr, const int count); * - returns newly allocated string */ void fix_entities (char **str); + +/* + * remove_tags: remove all occurences of tags beginning with tag_begin and ending with tag_end + * - e.g. remove_tags (&x, "") will remove all comments + * - returns newly allocated string + */ +void remove_tags (char **str, const char *tag_begin, const char *tag_end); -- cgit v1.2.3