Browse Source

fix comment

pull/1196/head
MSilva95 2 years ago committed by GitHub
parent
commit
4b05e16f54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      subjects/count-character/README.md

8
subjects/count-character/README.md

@ -4,8 +4,8 @@
Write a function that, given a string and a character as arguments, returns an int representing the number of times the character appears in the string.
- if the character is not in the string return 0
- if the string is empty return 0
- if the character is not in the string return 0.
- if the string is empty return 0.
### Expected Function
@ -26,7 +26,7 @@ import "fmt"
func main() {
fmt.Println(CountChar("Hello World", 'l'))
fmt.Println(CountChar("5 balloons",5))
fmt.Println(CountChar(" ", ' ')) //The first argument contains space and tabulation.
fmt.Println(CountChar(" ", ' ')) // The first argument contains one space and tabulations.
fmt.Println(CountChar("The 7 deadly sins", '7'))
}
```
@ -39,4 +39,4 @@ $ go run .
0
1
1
```
```

Loading…
Cancel
Save