...

Source file src/github.com/Azure/go-ansiterm/utilities.go

Documentation: github.com/Azure/go-ansiterm

     1  package ansiterm
     2  
     3  import (
     4  	"strconv"
     5  )
     6  
     7  func sliceContains(bytes []byte, b byte) bool {
     8  	for _, v := range bytes {
     9  		if v == b {
    10  			return true
    11  		}
    12  	}
    13  
    14  	return false
    15  }
    16  
    17  func convertBytesToInteger(bytes []byte) int {
    18  	s := string(bytes)
    19  	i, _ := strconv.Atoi(s)
    20  	return i
    21  }
    22  

View as plain text