From a388a8f228b46079a66b5b30c0f0d165cc294457 Mon Sep 17 00:00:00 2001 From: Peter Berezny Date: Tue, 22 Nov 2016 16:14:12 +0100 Subject: [PATCH] Readme update for character offset --- readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index fbbd62a..b8b6f0b 100644 --- a/readme.md +++ b/readme.md @@ -135,10 +135,10 @@ reactStringReplace('hey hey you', /(hey)/g, () => hey); Type: `function` -The replacer function to run each time `match` is found. This function will be patched the matching string and an index which can be used for adding keys to replacement components if necessary. +The replacer function to run each time `match` is found. This function will be patched the matching string and an `index` which can be used for adding keys to replacement components if necessary. Character `offset` identifies the position of match start in the provided text. ```js -const func = (match, index) => {match}; +const func = (match, index, offset) => {match}; reactStringReplace('hey hey you', /(hey)/g, func); ```