This question already has an answer here:
- Is string X a subsequence of string Y? 50 answers
Given two inputs, you should print or return whether the characters in the first string are - in order - inside the second string.
For example, we want to check whether the string
hello, taken as the first input, and the sample text (the second input) is
This should output a truthy value, as the first input is in the second input. I will highlight it like this:
hello abhcedddldddoallllll 0 (not enough 'l's - the last few 'l's don't count because they're after the 'o') hello ahaecldleldo 1 (the multiple 'l's are fine) foo adasdasdsadasdasdasdasfsadasdasoddddddo 1 bar aaabaaaarrrrra 1 bob bob 1
You may, of course use other truthy or falsy values, and, of course, exclude text in brackets in your output.
You will only receive printable ASCII characters as input (that is, no whitespace or characters such as
The shortest answer in bytes wins!