xrandr/utils.go

24 lines
306 B
Go
Raw Normal View History

2023-12-18 23:08:42 +01:00
package xrandr
import "strconv"
func isNewLine(rn rune) bool {
return rn == '\n'
}
func atoi(str string) int {
n, err := strconv.Atoi(str)
if err != nil {
panic(err)
}
return n
}
func atof(str string) float64 {
f, err := strconv.ParseFloat(str, 64)
if err != nil {
panic(err)
}
return f
}