mirror of https://github.com/01-edu/public.git
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
776 B
25 lines
776 B
5 years ago
|
## splitprog
|
||
|
|
||
|
### Instructions
|
||
|
|
||
|
Écrire une fonction qui sépare les mots d'une `string`, qui les met dans un tableau de `string` et qui les affichent sur la sortie standard.
|
||
|
|
||
|
Le programme reçoit deux paramètres:
|
||
|
|
||
|
- Le premier est la `string`
|
||
|
- Le deuxième est le séparateur
|
||
|
|
||
|
### Expected output :
|
||
|
|
||
|
```console
|
||
|
student@ubuntu:~/piscine-go/splitprog$ go build
|
||
|
student@ubuntu:~/piscine-go/splitprog$ ./splitprog "HelloHAhowHAareHAyou?" HA | cat -e
|
||
|
[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$
|
||
|
```
|