Consider to pass the items as an array, like:
function Multipos(const A: array of string; const S: string): string; begin for var E in A do if Pos(E, S) > 0 then Exit(E); Result := ''; // Nothing found end; // sample callcalls Multipos(['word1', 'word2', 'word3'], 'this'sample istext awith sampleword2'); Multipos('word1#word2#word3'.Split(['#']), 'sample text with word2');`; To implement RequireAll functionality, stop on first failure. Just check what to return in that case.
Also, TStrings/TStringList could work for your needs. Check it's Delimiter and DelimitedText properties.