Comparing a string to a sequence of chars

I have the following string

"long"

And I have an array of chars that will contain the sequence [..., [l],[o],[n],[g],...] somewhere in it. Can someone help me find a way to compare the string to the array of chars and return a True or False without having to join the array into one string?

Thanks!



Read more here: https://stackoverflow.com/questions/67922960/comparing-a-string-to-a-sequence-of-chars

Content Attribution

This content was originally published by hasan at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: