summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authordaniel-Jones <daniel@danieljon.es>2018-10-16 21:35:35 +1030
committerdaniel-Jones <daniel@danieljon.es>2018-10-16 21:35:35 +1030
commit0cd49451688077dca4ecbc9c346af848b530769c (patch)
treeac434e8b1a4efbd6e71b8e733dbd0ccf15ed3bb1 /README.md
parent6bedb1aeec8b2fc40b6729ab178127980143f64b (diff)
downloadreplace-0cd49451688077dca4ecbc9c346af848b530769c.tar.gz
replace-0cd49451688077dca4ecbc9c346af848b530769c.zip
added replaceinmemory() example
Diffstat (limited to 'README.md')
-rw-r--r--README.md12
1 files changed, 11 insertions, 1 deletions
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