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

Method Prefix

stringy.go:388–395  ·  view source on GitHub ↗

Prefix makes sure that string is prefixed with a given string

(with string)

Source from the content-addressed store, hash-verified

386
387// Prefix makes sure that string is prefixed with a given string
388func (i *input) Prefix(with string) string {
389 input := getInput(*i)
390 if strings.HasPrefix(input, with) {
391 return input
392 }
393
394 return with + input
395}
396
397// Suffix makes sure that string is suffixed with a given string
398func (i *input) Suffix(with string) string {

Callers

nothing calls this directly

Calls 1

getInputFunction · 0.85

Tested by

no test coverage detected