package main
import (
"fmt"
"github.com/monstercat/golib/string"
"strings"
)
func main() {
out := strings.SplitAfter("hello----world", "---")
fmt.Printf("%q\n", out)
out = strutil.SplitBefore("hello----world", "---")
fmt.Printf("%q\n", out)
}
result:
["hello---" "-world"]
["hello" "-" "---world"]
result: