Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/encodeous/nylon
/ StripAnsi
Function
StripAnsi
e2e/logging.go:17–19 ·
view source on GitHub ↗
(s string)
Source
from the content-addressed store, hash-verified
15
var
ansiRegex = regexp.MustCompile(`\x1b\[[0-9;]*[a-zA-Z]`)
16
17
func
StripAnsi(s string) string {
18
return
ansiRegex.ReplaceAllString(s,
""
)
19
}
20
21
type
LogSource string
22
Callers
3
Accept
Method · 0.85
Write
Method · 0.85
Exec
Method · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected