mirror of https://github.com/01-edu/public.git
Mohamed Zaboub
2 years ago
committed by
José Rosendo
1 changed files with 43 additions and 0 deletions
@ -0,0 +1,43 @@ |
|||||||
|
## issamestring |
||||||
|
|
||||||
|
### Instructions |
||||||
|
|
||||||
|
Write a function that returns `true` if the two `strings` passed as parameter are equal. Otherwise it returns `false`. |
||||||
|
|
||||||
|
The function will ignore the case of the characters. |
||||||
|
|
||||||
|
### Expected function |
||||||
|
|
||||||
|
```go |
||||||
|
func IsSameString(s1, s2 string) bool { |
||||||
|
|
||||||
|
} |
||||||
|
``` |
||||||
|
|
||||||
|
### Usage |
||||||
|
|
||||||
|
Here is a possible program to test your function : |
||||||
|
|
||||||
|
```go |
||||||
|
package main |
||||||
|
|
||||||
|
import ( |
||||||
|
"fmt" |
||||||
|
"piscine" |
||||||
|
) |
||||||
|
|
||||||
|
func main() { |
||||||
|
fmt.Println(piscine.IsSameString("hello world!", "HELLO WORLD!")) |
||||||
|
fmt.Println(piscine.IsSameString("0101 is awesome", "0101 is AWESOME")) |
||||||
|
fmt.Println(piscine.IsSameString("foo baz", "foo bar")) |
||||||
|
} |
||||||
|
``` |
||||||
|
|
||||||
|
And its output : |
||||||
|
|
||||||
|
```console |
||||||
|
$ go run . |
||||||
|
true |
||||||
|
true |
||||||
|
false |
||||||
|
``` |
Loading…
Reference in new issue