/* Strings_extensions.c */
/* David Weenink, 20011003 */

#include "Strings_extensions.h"
#include "NUM2.h"

Strings Strings_change (Strings me, char *search, char *replace, 
	int maximumNumberOfReplaces, long *nmatches, long *nstringmatches, 
	int use_regexp)
{
	char **strings;
	Strings thee = new (Strings);
	if (thee == NULL) return NULL;
	
	strings = strs_replace (my strings, 1, my numberOfStrings, 
		search, replace, maximumNumberOfReplaces, nmatches, 
		nstringmatches, use_regexp);
		
	if (strings == NULL)
	{
		forget (thee);
		return NULL;
	}
	thy numberOfStrings = my numberOfStrings;
	thy strings = strings;
	return thee;
}

/* End of file Strings_extensions.c */
