Are Letters in the Second String Present in the First?

Published by Matt in

Create a function that accepts an array of two strings and checks if all of the letters in the second string are present in the first string.

Examples

letter_check(["trances", "nectar"]) ➞ true

letter_check(["compadres", "DRAPES"]) ➞ true

letter_check(["parses", "parsecs"]) ➞ false

Notes

  • Function should not be case sensitive (as indicated in the second example).
  • Both strings are presented as a single argument in the form of an array.
  • Bonus: Solve this without RegEx.
Watch a quick demo on how Edabit works.