MCPcopy Create free account
hub / github.com/cli/cli / ContainsEscapeSequence

Function ContainsEscapeSequence

pkg/iostreams/content.go:18–20  ·  view source on GitHub ↗

ContainsEscapeSequence reports whether b contains an ANSI escape byte (0x1B), which can manipulate a terminal when printed.

(b []byte)

Source from the content-addressed store, hash-verified

16// ContainsEscapeSequence reports whether b contains an ANSI escape byte (0x1B),
17// which can manipulate a terminal when printed.
18func ContainsEscapeSequence(b []byte) bool {
19 return bytes.IndexByte(b, 0x1B) >= 0
20}
21
22// BinaryContentType reports whether content appears to be binary and, if so,
23// returns its detected MIME type. Textual content returns ("", false).

Callers 5

viewRunFunction · 0.92
readFileRunFunction · 0.92
diffRunFunction · 0.92
CopyGuardedContentFunction · 0.85

Calls

no outgoing calls

Tested by 1