summaryrefslogtreecommitdiff
path: root/internal/mapr/funcs/maskdigits.go
blob: d51f3d84f59b822c0bc0f28bfe8cfec89421d400 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package funcs

// MaskDigits masks all digits (replaces them with .)
func MaskDigits(input string) string {
	s := []byte(input)

	for i, b := range s {
		if '0' <= b && b <= '9' {
			s[i] = '.'
		}
	}

	return string(s)
}