aboutsummaryrefslogblamecommitdiff
path: root/util.go
blob: 8754348702abb24867e2f81a39bfffd5a4f5aa94 (plain) (tree)
1
2
3
4
5
6
7
8







                                                         








                                       
package main

func trimInitialSpaces(line string) string {
	var i int
	for i = 0; i < len(line) && line[i] == ' '; i++ {
	}
	return line[i:]
}

func isASCII(str string) bool {
	for i := 0; i < len(str); i++ {
		if str[i] > 127 {
			return false
		}
	}
	return true
}