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

12 lines
221 B
Go

package internal
import (
"strings"
)
func RemoveAndCountPrefix(input, subString string) (string, int) {
inputLength := len(input)
input = strings.TrimLeft(input, subString)
return input, inputLength - len(input)
}