summaryrefslogtreecommitdiff
path: root/main.c
blob: a0b7b4d2d6c2dc5733cf0b511e3d2925d3392749 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <stdio.h>
#include <stdlib.h>
#include "replace.h"

int
main(void)
{
	int ret;
	ret = replaceinfile("input.txt", "output.txt", "%PLACEHOLDER%", "replacement string");
	if (ret == 0)
		puts("failed");
	char *rep = replaceinmemory("this string this string is a test string", "string", "word");
	printf("%s\n", rep);
	free(rep);
	return 0;
}