From 1fe84e6d6d1000c94af0dba06c9c4f3bf8e08ce9 Mon Sep 17 00:00:00 2001 From: hamza Date: Wed, 3 Aug 2022 00:00:34 +0100 Subject: [PATCH] DEV-3384 docs(isCapitalize):add the subject --- subjects/iscapitalize/README.md | 42 +++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 subjects/iscapitalize/README.md diff --git a/subjects/iscapitalize/README.md b/subjects/iscapitalize/README.md new file mode 100644 index 00000000..91b9a839 --- /dev/null +++ b/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 +``` \ No newline at end of file