From d55cea067923571a1153ffe4adef4e379d2c2e89 Mon Sep 17 00:00:00 2001 From: Ke Chen Date: Fri, 24 May 2024 18:40:30 +0800 Subject: [PATCH] fix: min index in CutLastAny --- utils/utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/utils.go b/utils/utils.go index 6340450..3225275 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -41,7 +41,7 @@ func CutLastAny(s string, chars string) (before, after string, found bool) { } } if index > 0 { - maxIndex = min(maxIndex, index) + maxIndex = max(maxIndex, index) } } if maxIndex == -1 {