MCPcopy Index your code
hub / github.com/c-bata/go-prompt / leadingWhitespaceInCurrentLine

Method leadingWhitespaceInCurrentLine

document.go:437–441  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

435}
436
437func (d *Document) leadingWhitespaceInCurrentLine() (margin string) {
438 trimmed := strings.TrimSpace(d.CurrentLine())
439 margin = d.CurrentLine()[:len(d.CurrentLine())-len(trimmed)]
440 return
441}

Callers 1

NewLineMethod · 0.80

Calls 1

CurrentLineMethod · 0.95

Tested by

no test coverage detected