bf51655a7b
Signed-off-by: Jacek J. Łakis <jacek.lakis@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
21 lines
274 B
Go
21 lines
274 B
Go
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
|
|
}
|