I am stumped. I wanted to know if any combination in sequence order of the string is available. like for example my string to match is
string somevar = "rat";
then if an another string contains "rat", "at", "ra" or "r", "a", "t" it should return false.
I can only think of making condition for every single sequence i can manually find. but I am sure there could be some trick to find it easily. I had a look on Implement a function that prints all possible combinations of the characters in a string but it doesnt do what I want.
I am sorry if this is not very clear but I want to check a condition where
if(somevar == "rat" || somevar == "at" || somevar == "ra" || somevar == "r" || somevar == "a" || somevar == "t")
{
\\do something
}