#1 2018-08-09 18:33:35

songshuang
Member
From: changzhou,jiangsu,china
Registered: 2018-08-09
Posts: 20

about IdemPChar function

if IdemPChar(pointer(Ctxt.URL),'abc') then
.....
but always return false?
same response  on windows both linux .

Last edited by songshuang (2018-08-09 18:35:43)

Offline

#2 2018-08-09 18:36:54

songshuang
Member
From: changzhou,jiangsu,china
Registered: 2018-08-09
Posts: 20

Re: about IdemPChar function

delphi7 , lazarus cross.....

Offline

#3 2018-08-09 19:17:34

5c4f394a
Member
Registered: 2013-03-22
Posts: 11

Re: about IdemPChar function

songshuang wrote:

if IdemPChar(pointer(Ctxt.URL),'abc') then
.....
but always return false?
same response  on windows both linux .

function IdemPChar(p: PUTF8Char; up: PAnsiChar): boolean;
// if the beginning of p^ is same as up^ (ignore case - up^ must be already Upper)
var
  lStr: string;
begin
  lStr := 'ABC';
  ShowMessage( BoolToStr( IdemPChar(Pointer(lStr), 'abc' ), True ) );
  // False
  ShowMessage( BoolToStr( IdemPChar(Pointer(lStr), 'ABC' ), True ) );
  // True
  ShowMessage( BoolToStr( IdemPChar(Pointer(lStr), 'Abc' ), True ) );
  // False
  ShowMessage( BoolToStr( IdemPChar(Pointer(lStr), PAnsiChar(UpperCase('Abc')) ), True ) );
  // True
end;

Offline

#4 2018-08-10 15:10:56

songshuang
Member
From: changzhou,jiangsu,china
Registered: 2018-08-09
Posts: 20

Re: about IdemPChar function

i see.., thanks very much

Offline

#5 2018-08-10 15:15:20

songshuang
Member
From: changzhou,jiangsu,china
Registered: 2018-08-09
Posts: 20

Re: about IdemPChar function

others,
the amount of pascal user  is A little pitiful!,  i m shy to say  i m older psacal hands!,but but...
the pascal is wonderful because have mORMOT!
mOrMot is great!.

Offline

Board footer

Powered by FluxBB