]> Cypherpunks repositories - gostls13.git/commit
strings: improve readability of IndexAny and LastIndexAny functions.
authorGabriel Aszalos <gabriel.aszalos@gmail.com>
Mon, 25 Sep 2017 12:54:37 +0000 (14:54 +0200)
committerIan Lance Taylor <iant@golang.org>
Mon, 25 Sep 2017 18:23:11 +0000 (18:23 +0000)
commitc82ee79247e8e82a0699963e5b07ca7db8de5d51
treeb9044b19dd87a276ebc8f85bd69ceab76e513b41
parent5db7572ddfd431e14febbf5f006e0408c5f1ae1b
strings: improve readability of IndexAny and LastIndexAny functions.

This change removes the check of len(chars) > 0 inside the Index and
IndexAny functions which was redundant.

Change-Id: Iffbc0f2b3332c6e31c7514b5f644b6fe7bdcfe0d
Reviewed-on: https://go-review.googlesource.com/65910
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
src/strings/strings.go