public/subjects/wdmatch
Chris d2364ab6a9 aie aie aie 2021-06-14 16:14:32 +01:00
..
README.md aie aie aie 2021-06-14 16:14:32 +01:00

README.md

wdmatch

Instructions

Write a program that takes two string and checks whether it is possible to write the first string with characters from the second string. This rewrite must respect the order in which these characters appear in the second string.

If it is possible, the program displays the string followed by a newline ('\n'), otherwise it simply displays nothing.

If the number of arguments is different from 2, the program displays nothing.

Usage

$ go run . 123 123
123
$ go run . faya fgvvfdxcacpolhyghbreda
faya
$ go run . faya fgvvfdxcacpolhyghbred
$ go run . error rrerrrfiiljdfxjyuifrrvcoojh
$ go run . "quarante deux" "qfqfsudf arzgsayns tsregfdgs sjytdekuoixq "
quarante deux
$ go run .
$