procedure TForm1.Button1Click(Sender: TObject); var s1 : array[0..255] of char; i,j : integer; begin s1 := '#123423#hfei233#cnkdfk#fjhie8'; for i := 0 to length(s1) do if s1[i]='#' then begin j:=i; end; self.Caption :='右边的第一个#在字符串第'+inttostr(j)+'位'; end;
大不了自己转换字符的位置然后再POs()了
1234
4321
:)
->
Q_PosLastStr(区分大小写)Q_PosLastText
2ccc.com有下
var s1 : array[0..255] of char;
i,j : integer;
begin
s1 := '#123423#hfei233#cnkdfk#fjhie8';
for i := 0 to length(s1) do
if s1[i]='#' then
begin
j:=i; end;
self.Caption :='右边的第一个#在字符串第'+inttostr(j)+'位';
end;
extractpath()
length