package utils import "strings" func AddAsterisks(text string, prefixLen int, suffixLen int) string { strLen := len(text) padLen := strLen - prefixLen - suffixLen if padLen <= 0 { return text } return text[0:prefixLen] + strings.Repeat("*", padLen) + text[strLen-suffixLen:strLen] }