From 0cb639701a34f63d7c3b32c06a866470a887bc48 Mon Sep 17 00:00:00 2001 From: jrosendo Date: Wed, 7 Dec 2022 12:34:41 +0000 Subject: [PATCH] docs(checknumber): added subject - it was removed by mistake before --- subjects/checknumber/README.md | 37 ++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 subjects/checknumber/README.md diff --git a/subjects/checknumber/README.md b/subjects/checknumber/README.md new file mode 100644 index 000000000..c64874790 --- /dev/null +++ b/subjects/checknumber/README.md @@ -0,0 +1,37 @@ +## checknumber + +### Instructions + +Write a function that takes a `string` as an argument and returns `true` if the string contains any number, otherwise return `false`. + +### Expected function + +```go +func CheckNumber(arg string) bool { +} +``` + +### Usage + +Here is a possible program to test your function: + +```go +package main +import ( + "fmt" + "piscine" +) +func main() { + fmt.Println(piscine.CheckNumber("Hello")) + fmt.Println(piscine.CheckNumber("Hello1")) +} +``` + +And its output: + +```console +$ go run . +false +true +$ +```