1
Ask HN: Most efficient way to test if a string contains a word?
For an app I wrote I need to check if a String contains a word, finding the longest word it contains.
Currently I check the whole string against a dictionary, then check every substring possible with decreasing length until I find a word.
Is there a more efficient way to do this?