if PosEx(SearchText, mestr, N) > 0 then {表示inString中有一句话SearchText}
if Pos(SearchText, mestr) > 0 then
mestr表示源文本String型
SearchText表示查找的内容,
两个函数都是判断在mestr中是否存在SearchText字符串,PosEx返回第N个字符串的位置。Pos返回找到第一个字符串的位置
if PosEx(SearchText, mestr, N) > 0 then {表示inString中有一句话SearchText}
if Pos(SearchText, mestr) > 0 then
mestr表示源文本String型
SearchText表示查找的内容,
两个函数都是判断在mestr中是否存在SearchText字符串,PosEx返回第N个字符串的位置。Pos返回找到第一个字符串的位置
转载于:https://www.cnblogs.com/zousheng7018/archive/2012/10/17/2727217.html