MCPcopy Create free account
hub / github.com/diillson/chatcli / stripANSI

Function stripANSI

cli/cli_test.go:29–32  ·  view source on GitHub ↗

stripANSI remove códigos ANSI de uma string

(s string)

Source from the content-addressed store, hash-verified

27
28// stripANSI remove códigos ANSI de uma string
29func stripANSI(s string) string {
30 re := regexp.MustCompile(`\x1b\[[0-9;]*m`)
31 return re.ReplaceAllString(s, "")
32}
33
34// normalizeSpaces remove espaços extras para asserções flexíveis
35func normalizeSpaces(s string) string {

Callers 1

TestHandleVersionCommandFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected