From 4fa0d6e815d983bd312a6491a395546f0ca1ba13 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 000000000..91b9a839c --- /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