mirror of
https://github.com/alibaba/higress.git
synced 2026-03-04 08:30:48 +08:00
feat: Enhance the feature of ai-proxy plugin (#976)
This commit is contained in:
8
plugins/wasm-go/extensions/ai-proxy/util/string.go
Normal file
8
plugins/wasm-go/extensions/ai-proxy/util/string.go
Normal file
@@ -0,0 +1,8 @@
|
||||
package util
|
||||
|
||||
func StripPrefix(s string, prefix string) string {
|
||||
if len(prefix) != 0 && len(s) >= len(prefix) && s[0:len(prefix)] == prefix {
|
||||
return s[len(prefix):]
|
||||
}
|
||||
return s
|
||||
}
|
||||
Reference in New Issue
Block a user