hare

The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit b337bcfe98f0f09aca8688f1d3bc9f2053890631
parent 3967e17def84d5046d4c7df4e79cd2b1cfc80f8e
Author: Sebastian <sebastian@sebsite.pw>
Date:   Thu, 24 Feb 2022 20:47:20 -0500

strings: improve `replace` docs

Signed-off-by: Sebastian <sebastian@sebsite.pw>

Diffstat:
Mstrings/replace.ha | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/strings/replace.ha b/strings/replace.ha @@ -4,8 +4,8 @@ use bytes; -// Replaces all instances of 'needle' with 'target' in 's'. -// The caller must free the return value. +// Returns a new string duplicated from 's', but with all instances of 'needle' +// replaced with 'target'. The caller must free the return value. export fn replace(s: str, needle: str, target: str) str = { let res = toutf8(dup(s)); let needle = toutf8(needle);