You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
zainabdnaya cd65a41d33 feat: add solution of vowelsindex.go 2 years ago
..
README.md feat: add solution of vowelsindex.go 2 years ago

README.md

vowels-index

Instructions

  • Write a function that takes one argument of type string and returns an array of intergers containing the index of the vowels in the string.
  • vowels : [a,i ,e ,u o]

Expected function

func vowelsindex(str string) []int {
}

Usage

package main

import "fmt"

func main() {

	res := vowelsindex("hello Iyan")
	for _, i := range res {
		fmt.Println(i)
	}

}

And its output :


$ go run .  | cat -e
1$
4$
6$
8$