From 0cd49451688077dca4ecbc9c346af848b530769c Mon Sep 17 00:00:00 2001 From: daniel-Jones Date: Tue, 16 Oct 2018 21:35:35 +1030 Subject: added replaceinmemory() example --- README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 94fe5b2..96ab6a4 100644 --- a/README.md +++ b/README.md @@ -43,5 +43,15 @@ With lines and whatever, replacement string 123replacement string123 ok replacement string ok ```` +Also included a function to replace every occurance of ap lceholder with a string in memory. -See main.c for a usage example +```` +char *replaced = replaceinmemory("this string this string is a test string", "string", "word"); +if (!replaced) + puts("failed replacing word"); +else + puts(replaced); +free(replaced); /* you must free the returned memory pointer */ +```` + +See main.c for a usage examples -- cgit v1.2.3