I'm trying to find a nice way to determine if all items in one list exist in another list.
I have tried various methods, but they get uglier and uglier as I go and I'm hoping there is an elegant solution out there somewhere.
Attempt 1:
if (listOne.contains(ListTwo))
This doesn't error, but also doesn't work. I assume it is looking to find not the items but the actual list which it wont.
Attempt 2:
if (listOne.toString().substring(1,listOne.toString().length - 1).contains(listTwo.toString().substring(1,listTwo.toString().length - 1)))
This actually works, but it just seems fragile to me
Question: What is an elegant solution to determine if all the items in one list are in another list?