]> Cypherpunks.ru repositories - gostls13.git/commit
strings: document that order of pairs matters in NewReplacer
authorFrancesco Renzi <rentziass@gmail.com>
Tue, 9 Jul 2019 13:43:10 +0000 (14:43 +0100)
committerRob Pike <r@golang.org>
Wed, 10 Jul 2019 21:26:21 +0000 (21:26 +0000)
commit80cca23b59fe75ba588f7ddee7adb48a6afe2eb7
treea3ad8ebe00f9376e21b2429dc0421a886ea7d82e
parent9d56dd8ea30068aa3b3211939b50407b10edb50e
strings: document that order of pairs matters in NewReplacer

Update NewReplacer documentation to specify that in the case of
multiple matches at the same position, the matching old/new
pair that appears first in NewReplacer arguments takes precedence.

Fixes #32699

Change-Id: I9d0616d28e5cd8c9bfa301be201f2b0ebf361dff
Reviewed-on: https://go-review.googlesource.com/c/go/+/185099
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
src/strings/replace.go