cmd-zet/internal/ansi/ansi.go

10 lines
163 B
Go
Raw Normal View History

package ansi
import "regexp"
var ansiRegex = regexp.MustCompile(`\x1b\[[0-9;]*m`)
func StripANSI(s string) string {
return ansiRegex.ReplaceAllString(s, "")
}