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

Method Tease

stringy.go:347–353  ·  view source on GitHub ↗

Tease takes two params length and indicator and it shortens given string on passed length and adds indicator on end it can be chained on function which return StringManipulation interface

(length int, indicator string)

Source from the content-addressed store, hash-verified

345// on passed length and adds indicator on end
346// it can be chained on function which return StringManipulation interface
347func (i *input) Tease(length int, indicator string) string {
348 input := getInput(*i)
349 if input == "" || len(input) < length {
350 return input
351 }
352 return input[:length] + indicator
353}
354
355// ToLower makes all string of user input to lowercase
356// it can be chained on function which return StringManipulation interface

Callers

nothing calls this directly

Calls 1

getInputFunction · 0.85

Tested by

no test coverage detected