summaryrefslogtreecommitdiff
path: root/vendor/github.com/Azure/go-ansiterm/utilities.go
blob: 392114493a2221ed82dada3d9a2b8664206243f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package ansiterm

import (
	"strconv"
)

func sliceContains(bytes []byte, b byte) bool {
	for _, v := range bytes {
		if v == b {
			return true
		}
	}

	return false
}

func convertBytesToInteger(bytes []byte) int {
	s := string(bytes)
	i, _ := strconv.Atoi(s)
	return i
}