mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-12 17:27:50 +08:00
12 lines
262 B
Go
12 lines
262 B
Go
package store
|
|
|
|
import "strings"
|
|
|
|
var globEscaper = strings.NewReplacer("\\", "\\\\", "?", "\\?", "*", "\\*")
|
|
|
|
// EscapeGlob escapes s to be suitable as an argument to SQLite's GLOB
|
|
// operator.
|
|
func EscapeGlob(s string) string {
|
|
return globEscaper.Replace(s)
|
|
}
|