N noyamm Unregistered / Unconfirmed GUEST, unregistred user! 2002-11-28 #1 str:String; 我如何判断str的第一个字符是S或T?
迈 迈克老狼 Unregistered / Unconfirmed GUEST, unregistred user! 2002-11-28 #2 Copy(str,1,1)='S' Copy(str,1,1)='T';
T tseug Unregistered / Unconfirmed GUEST, unregistred user! 2002-11-28 #3 if Length(str) > 0 then begin case Str[1] of 'S' : begin end; 'T' : begin end; else begin end; end; end; end;
if Length(str) > 0 then begin case Str[1] of 'S' : begin end; 'T' : begin end; else begin end; end; end; end;
行 行素 Unregistered / Unconfirmed GUEST, unregistred user! 2002-11-28 #5 if Length(str) > 0 then begin if str[1]='T'then begin ///等于T end else if str[1]='s' then begin //等于S end; end else //字符串为空 //
if Length(str) > 0 then begin if str[1]='T'then begin ///等于T end else if str[1]='s' then begin //等于S end; end else //字符串为空 //
N noyamm Unregistered / Unconfirmed GUEST, unregistred user! 2002-11-28 #6 我自己的办法也简单:) if pos('S',str)=0 then ...