D delphilove Unregistered / Unconfirmed GUEST, unregistred user! 2002-09-28 #1 怎样判断一个字符串A在字符串B里面?例如:A:=‘靓女’;B:=‘我爱靓女';用那个函数?C里面可以用strstr,但为什么pascal好似无这么函数啊?(50分)<br />多谢!!!!!!!!!!!!!
怎样判断一个字符串A在字符串B里面?例如:A:=‘靓女’;B:=‘我爱靓女';用那个函数?C里面可以用strstr,但为什么pascal好似无这么函数啊?(50分)<br />多谢!!!!!!!!!!!!!
H hryyx Unregistered / Unconfirmed GUEST, unregistred user! 2002-09-28 #3 function Pos(Substr: string S: string): Integer;
W wzgss Unregistered / Unconfirmed GUEST, unregistred user! 2002-09-28 #5 var S: string; begin S := ' 123.5'; { Convert spaces to zeros } while Pos(' ', S) > 0 do S[Pos(' ', S)] := '0'; end;
var S: string; begin S := ' 123.5'; { Convert spaces to zeros } while Pos(' ', S) > 0 do S[Pos(' ', S)] := '0'; end;
A aozhuosen Unregistered / Unconfirmed GUEST, unregistred user! 2002-09-28 #6 var A,B:String; begin A:='靓女'; B:='我爱靓女'; if Pos(A,B) > 0 then Showmessage('B包含A!'); end;