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.
27 lines
907 B
27 lines
907 B
6 years ago
|
## union
|
||
6 years ago
|
|
||
6 years ago
|
### Instructions
|
||
6 years ago
|
|
||
5 years ago
|
Write a program that takes two `string` and displays, without doubles, the characters that appear in either one of the `string`.
|
||
6 years ago
|
|
||
5 years ago
|
The display will be in the order characters appear in the command line, and will be followed by a newline (`'\n'`).
|
||
6 years ago
|
|
||
5 years ago
|
If the number of arguments is different from 2, the program displays newline (`'\n'`).
|
||
6 years ago
|
|
||
5 years ago
|
### Usage
|
||
6 years ago
|
|
||
|
```console
|
||
5 years ago
|
student@ubuntu:~/piscine-go/union$ go build
|
||
|
student@ubuntu:~/piscine-go/union$ ./union zpadinton "paqefwtdjetyiytjneytjoeyjnejeyj" | cat -e
|
||
6 years ago
|
zpadintoqefwjy$
|
||
5 years ago
|
student@ubuntu:~/piscine-go/union$ ./union ddf6vewg64f gtwthgdwthdwfteewhrtag6h4ffdhsd | cat -e
|
||
6 years ago
|
df6vewg4thras$
|
||
5 years ago
|
student@ubuntu:~/piscine-go/union$ ./union "rien" "cette phrase ne cache rien" | cat -e
|
||
6 years ago
|
rienct phas$
|
||
5 years ago
|
student@ubuntu:~/piscine-go/union$ ./union | cat -e
|
||
6 years ago
|
$
|
||
5 years ago
|
student@ubuntu:~/piscine-go/union$ ./union "rien" | cat -e
|
||
6 years ago
|
$
|
||
5 years ago
|
student@ubuntu:~/piscine-go/union$
|
||
6 years ago
|
```
|