File: utilities.go

package info (click to toggle)
golang-github-azure-go-ansiterm 0.0~git20160622.0.fa152c5-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 252 kB
  • sloc: makefile: 2
file content (21 lines) | stat: -rw-r--r-- 274 bytes parent folder | download | duplicates (6)
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
}