Prefix makes sure that string is prefixed with a given string
(with string)
| 386 | |
| 387 | // Prefix makes sure that string is prefixed with a given string |
| 388 | func (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 |
| 398 | func (i *input) Suffix(with string) string { |
nothing calls this directly
no test coverage detected