You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
772 B

5 years ago
## splitprog
### Instructions
Write a program that separates the words of a `string` and puts them in a `string` array and then prints it to standard output.
- The program receives two parameters:
- The first parameter is the `string`
- The second parameter is the `separator`
### Expected output :
```console
student@ubuntu:~/piscine-go/splitprog$ go build
student@ubuntu:~/piscine-go/splitprog$ ./splitprog "HelloHAhowHAareHAyou?" HA
[Hello how are you?]
student@ubuntu:~/piscine-go/splitprog$ ./splitprog "Hello,how,are,you?" ","
[Hello how are you?]
student@ubuntu:~/piscine-go/splitprog$ ./splitprog "HelloHAhowHAareHAyou?"
student@ubuntu:~/piscine-go/splitprog$
student@ubuntu:~/piscine-go/splitprog$ ./splitprog
student@ubuntu:~/piscine-go/splitprog$
```