DEV Community

loading...

Discussion on: Daily Challenge #3 - Vowel Counter

Collapse
mrdulin profile image
official_dulin

Go:

package kata

import "strings"

func GetCount(str string) (count int) {
  var vowels = "aeiou"
  for _, v := range str {
    if strings.Contains(vowels, string(v)) {
      count++
    }
  }
  return
}