The following are methods for StringUtil.
The shortContent is a word or in a word, if the lengthContent contains the shortContent, so returns true.
System.assert(StringUtil.match('This is a test record.', 'record', true), true);
System.assert(StringUtil.match('This is a test record.', 'reco', true), false);
If this project help you reduce time to develop, you can give me a cup of coffee :)