mfer/vendor/github.com/pterm/pterm/internal/remove_and_count_prefix.go

12 lines
221 B
Go
Raw Normal View History

2022-02-02 05:36:27 +00:00
package internal
import (
"strings"
)
func RemoveAndCountPrefix(input, subString string) (string, int) {
inputLength := len(input)
input = strings.TrimLeft(input, subString)
return input, inputLength - len(input)
}