From 32de45121a28b3c18c4380af6dc6fbcb350fd91d Mon Sep 17 00:00:00 2001 From: R22627 Date: Thu, 16 Nov 2023 19:57:43 +0800 Subject: [PATCH] style:simplify codes --- str/string.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/str/string.go b/str/string.go index 69cfd5e..9a1868e 100644 --- a/str/string.go +++ b/str/string.go @@ -179,7 +179,7 @@ func IndexOfDiff(s1, s2 string) int { // An empty string ("") will return -1 (INDEX_NOT_FOUND). // A negative start position is treated as zero. // A start position greater than the string length returns -1. -func IndexOffset(s string, sub string, start int) int { +func IndexOffset(s, sub string, start int) int { if start < 0 { start = 0 }