MCPcopy
hub / github.com/micro-editor/micro / IsSpaces

Function IsSpaces

internal/util/util.go:322–330  ·  view source on GitHub ↗

IsSpaces checks if a given string is only spaces

(str []byte)

Source from the content-addressed store, hash-verified

320
321// IsSpaces checks if a given string is only spaces
322func IsSpaces(str []byte) bool {
323 for _, c := range str {
324 if c != ' ' {
325 return false
326 }
327 }
328
329 return true
330}
331
332// IsSpacesOrTabs checks if a given string contains only spaces and tabs
333func IsSpacesOrTabs(str []byte) bool {

Callers 3

CursorLeftMethod · 0.92
CursorRightMethod · 0.92
BackspaceMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected