MCPcopy
hub / github.com/mathaou/termdbms / SplitLines

Function SplitLines

viewer/util.go:179–192  ·  view source on GitHub ↗
(s string)

Source from the content-addressed store, hash-verified

177}
178
179func SplitLines(s string) []string {
180 var lines []string
181 if strings.Count(s, "\n") == 0 {
182 return append(lines, s)
183 }
184
185 reader := strings.NewReader(s)
186 sc := bufio.NewScanner(reader)
187
188 for sc.Scan() {
189 lines = append(lines, sc.Text())
190 }
191 return lines
192}
193
194func GetScrollDownMaximumForSelection(m *TuiModel) int {
195 max := 0

Callers 4

TruncateIfApplicableFunction · 0.85
GetFormattedTextBufferFunction · 0.85
DisplaySelectionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected