Browse Source

DEV-3384 docs(isCapitalize):add the subject

DEV-3384-new-go-exercise-is-capitalaze
hamza 2 years ago
parent
commit
1fe84e6d6d
  1. 42
      subjects/iscapitalize/README.md

42
subjects/iscapitalize/README.md

@ -0,0 +1,42 @@
## is-Capitalize
### Instructions
- Write a function `IsCapitalize` that takes a string and returns `true` if each word in the string begins with an uppercase letter, otherwise, and returns `false`. except for the word that begins with non-alphanumerical characters.
- If the string is empty, return `false`.
### Expected function
```go
func IsCapitalize(s string) bool {
}
```
### Usage
Here is a possible program to test your function :
```go
package main
import (
"fmt"
)
func main() {
fmt.Println(IsAlpha("Hello! How are you?"))
fmt.Println(IsAlpha("Hello How Are You"))
fmt.Println(IsAlpha("Whats 4this 100K?"))
fmt.Println(IsAlpha("Whatsthis4"))
}
```
And its output :
```console
$ go run .
false
true
true
true
```
Loading…
Cancel
Save