View Single Post
Old April 5, 2020, 00:55   #8
DavidMedley
Veteran
 
Join Date: Oct 2019
Posts: 1,003
DavidMedley is on a distinguished road
Quote:
Originally Posted by Nick View Post
Code:
char *de_armour(const char *name)
{
	char newname[40];
	char *armour;

	my_strcpy(newname, name, sizeof(newname));
	armour = strstr(newname, "armour");
	if (armour)
		my_strcpy(armour + 4, "r", 2);

	return string_make(newname);
}
I've never appreciated regular expressions more.
DavidMedley is offline   Reply With Quote