summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/main.c b/main.c
index 8efc66c..a0b7b4d 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,5 @@
#include <stdio.h>
+#include <stdlib.h>
#include "replace.h"
int
@@ -8,5 +9,8 @@ main(void)
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;
}