MCPcopy Create free account
hub / github.com/gobeam/stringy / Lines

Method Lines

stringy.go:232–236  ·  view source on GitHub ↗

Lines returns slice of strings by removing white space characters

()

Source from the content-addressed store, hash-verified

230
231// Lines returns slice of strings by removing white space characters
232func (i *input) Lines() []string {
233 input := getInput(*i)
234 result := matchWordRegexp.ReplaceAllString(input, " ")
235 return strings.Fields(strings.TrimSpace(result))
236}
237
238// Pad takes three param length i.e total length to be after padding, with i.e what to pad
239// with and pad type which can be ("both" or "left" or "right") it return string after padding

Callers

nothing calls this directly

Calls 1

getInputFunction · 0.85

Tested by

no test coverage detected