diff --git a/subjects/zipstring/README.md b/subjects/zipstring/README.md index 10383b58d..bb9c7790a 100644 --- a/subjects/zipstring/README.md +++ b/subjects/zipstring/README.md @@ -2,9 +2,9 @@ ### Instructions -Write a function that takes a `string` and returns a new string that replaces every character with the number of duplicates and the character itself, deleting the extra duplications. +Write a function that takes a `string` and returns a new `string` that replaces every character with the number of duplicates and the character itself, deleting the extra duplications. -The letters are from the Latin alphabet list only, any other characters, symbols or empty spaces shall not be tested. +- The letters are from the latin alphabet list only. Any other character, symbols, shall not be tested. ### Expected function @@ -16,7 +16,7 @@ func ZipString(s string) string { ### Usage -Here is a possible program to test your function : +Here is a possible program to test your function: ```go package main @@ -27,15 +27,18 @@ import ( ) func main() { - fmt.Println(piscine.ZipString("YouuungFellllas")) + fmt.Println(ZipString("YouuungFellllas")) + fmt.Println(ZipString("Thee quuick browwn fox juumps over the laaazy dog")) + fmt.Println(ZipString("Helloo Therre!")) } - ``` -And its output : +And its output: ```console $ go run . 1Y1o3u1n1g1F1e4l1a1s +1T1h2e1 1q2u1i1c1k1 1b1r1o2w1n1 1f1o1x1 1j2u1m1p1s1 1o1v1e1r1 1t1h1e1 1l3a1z1y1 1d1o1g +1H1e2l2o1 1T1h1e2r1e1! $ ```