7 // Count returns the length of a string in runes
8 func Count(s string) int {
9 return utf8.RuneCountInString(s)
12 // NumOccurences counts the number of occurences of a byte in a string
13 func NumOccurences(s string, c byte) int {
15 for i := 0; i < len(s); i++ {
23 // EmptyString returns an empty string n spaces long
24 func EmptyString(n int) string {
26 for i := 0; i < n; i++ {