Skip to content

Commit

Permalink
commit by Simon.Ye
Browse files Browse the repository at this point in the history
  • Loading branch information
samlinye committed Nov 5, 2021
1 parent 8f63561 commit 74d3348
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions util/stringx/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ func SubstringBefore(str, delimiter string, last ...bool) string {
if len(last) > 0 && last[0] {
idx = strings.LastIndex(str, delimiter)
} else {
strings.Index(str, delimiter)
idx = strings.Index(str, delimiter)
}

if idx < 1 {
Expand All @@ -564,7 +564,7 @@ func SubstringAfter(str, delimiter string, last ...bool) string {
if len(last) > 0 && last[0] {
idx = strings.LastIndex(str, delimiter)
} else {
strings.Index(str, delimiter)
idx = strings.Index(str, delimiter)
}

if idx < 0 {
Expand Down

0 comments on commit 74d3348

Please sign in to comment.