Browse Source

fix(loafofbread): add missing import piscine and add second # to the title

1153-word-abbreviate
Tiago Collot 2 years ago
parent
commit
57ab470299
  1. 15
      subjects/loafofbread/README.md

15
subjects/loafofbread/README.md

@ -1,8 +1,8 @@
# loafofbread
## loafofbread
### Instructions
Write a function `LoafOfBread()` that takes a string and returns another one with words of 5 characters and skips the next character followed by newline `\n`.
Write a function `LoafOfBread()` that takes a `string` and returns another one with words of 5 characters and skips the next character followed by newline `\n`.
- If there is a space in the middle of a word it should ignore it and get the next character until getting to a length of 5.
- If the string is less than 5 characters return "Invalid Output\n".
@ -22,12 +22,15 @@ Here is a possible program to test your function:
```go
package main
import "fmt"
import (
"fmt"
"piscine"
)
func main() {
fmt.Print(LoafOfBread("deliciousbread"))
fmt.Print(LoafOfBread("This is a loaf of bread"))
fmt.Print(LoafOfBread("loaf"))
fmt.Print(piscine.LoafOfBread("deliciousbread"))
fmt.Print(piscine.LoafOfBread("This is a loaf of bread"))
fmt.Print(piscine.LoafOfBread("loaf"))
}
```

Loading…
Cancel
Save