]> Cypherpunks repositories - gostls13.git/commitdiff
internal/bytealg: fix typo in IndexRabinKarp{,Bytes} godoc
authorTobias Klauser <tklauser@distanz.ch>
Mon, 12 Oct 2020 09:19:41 +0000 (11:19 +0200)
committerTobias Klauser <tobias.klauser@gmail.com>
Tue, 13 Oct 2020 06:48:02 +0000 (06:48 +0000)
Change-Id: I09ba19e19b195e345a0fe29d542e0d86529b0d31
Reviewed-on: https://go-review.googlesource.com/c/go/+/261359
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/internal/bytealg/bytealg.go

index 6fd930836942ee8450f11b4ea67fde15668385c4..b30c2344367e1a0e51bd1393a3931990c38b9d56 100644 (file)
@@ -99,7 +99,7 @@ func HashStrRev(sep string) (uint32, uint32) {
 }
 
 // IndexRabinKarpBytes uses the Rabin-Karp search algorithm to return the index of the
-// first occurence of substr in s, or -1 if not present.
+// first occurrence of substr in s, or -1 if not present.
 func IndexRabinKarpBytes(s, sep []byte) int {
        // Rabin-Karp search
        hashsep, pow := HashStrBytes(sep)
@@ -124,7 +124,7 @@ func IndexRabinKarpBytes(s, sep []byte) int {
 }
 
 // IndexRabinKarp uses the Rabin-Karp search algorithm to return the index of the
-// first occurence of substr in s, or -1 if not present.
+// first occurrence of substr in s, or -1 if not present.
 func IndexRabinKarp(s, substr string) int {
        // Rabin-Karp search
        hashss, pow := HashStr(substr)