I have a string:
String s = "Hel";
I have a list of Strings.
List<String> listS = ["Hello", "Goodbye"];
The following will print true as "Hello" contains "Hel":
list[0].contains(s);
The following will however print false:
list.contains(s);
What can I do to check if the list contains string S without giving an index? A loop is no option as I am using a ternary operator:
list.contains(s) ? .....