Skip to content

Commit

Permalink
style:simplify codes
Browse files Browse the repository at this point in the history
  • Loading branch information
R22627 authored and R22627 committed Nov 16, 2023
1 parent 1dc0938 commit 32de451
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion str/string.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 32de451

Please sign in to comment.