Z zgyingmu Unregistered / Unconfirmed GUEST, unregistred user! 2001-09-19 #1 请问Delphi中有没有一个判断是否包含某个字符串的函数。即字符串‘123’应该 包含在字符串‘aaa123456’中。
小 小人物 Unregistered / Unconfirmed GUEST, unregistred user! 2001-09-19 #4 function Pos(Substr: string S: string): Integer; 用法:if pos('123','aaa123456')<>0 then showmessage('字符串"123"包含在字符串"aaa123456"中');
function Pos(Substr: string S: string): Integer; 用法:if pos('123','aaa123456')<>0 then showmessage('字符串"123"包含在字符串"aaa123456"中');
P penkerlove Unregistered / Unconfirmed GUEST, unregistred user! 2001-09-20 #5 If StrPos(Pchar('aaa123456'),Pchar('123'))<>nil then ShowMessage('字符串"123"包含在字符串"aaa123456"中');
Y YB_unique Unregistered / Unconfirmed GUEST, unregistred user! 2001-10-20 #7 没什么可说的了! Pos、StrPos都可以!
W WuWZY Unregistered / Unconfirmed GUEST, unregistred user! 2001-10-20 #9 pos - pascal's string. strpos - pchar(null-terminated)