变量修饰符增加quote

This commit is contained in:
GoEdgeLab
2024-05-01 19:44:11 +08:00
parent 26efc2ba34
commit 5dfe3044d1
2 changed files with 27 additions and 0 deletions

View File

@@ -8,6 +8,7 @@ import (
stringutil "github.com/iwind/TeaGo/utils/string"
"net/url"
"regexp"
"strconv"
"strings"
"sync"
)
@@ -183,6 +184,9 @@ func doStringModifiers(value string, modifiers []string) string {
value = strings.ToLower(value)
case "toUpperCase":
value = strings.ToUpper(value)
case "quote":
value = strconv.Quote(value)
}
}
return value