From 4df40dfcf0f532cfb206c0b030aa2f9ad40538a5 Mon Sep 17 00:00:00 2001 From: zainabdnaya Date: Thu, 9 Jun 2022 18:26:44 +0100 Subject: [PATCH] feat: add vowels-index --- subjects/vowels-index/README.md | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/subjects/vowels-index/README.md b/subjects/vowels-index/README.md index 0cddda7a..0b3608b4 100644 --- a/subjects/vowels-index/README.md +++ b/subjects/vowels-index/README.md @@ -13,12 +13,27 @@ func VowelIdx(str string) []int { ``` ### Usage +```go +package main + +import "fmt" + +func main() { + + res := VowelIdx("hello Iyan") + for _, i := range res { + fmt.Println(i) + } + +} +``` +And its output : ```console -$ go run . "hello Iyan" -$2 -$5 -$7 -$8 -$9 + +$ go run . +$ 1 +$ 4 +$ 6 +$ 8 ```