R
RippleW
Unregistered / Unconfirmed
GUEST, unregistred user!
我用IsDBCSLeadByte判断一个字节是否是汉字
procedure TForm1.Button3Click(Sender: TObject);
var
S : String;
PC : PChar;
res : Bool;
i : integer;
begin
S := '你好';
PC := PChar(S);
for i := 0 to 3 do
begin
res := IsDBCSLeadByte(Byte(Pc));
if res = true then
ShowMessage('IsLead')
else
ShowMessage('Not Lead');
end;
end;
每次是Islead
我如何才能当前字节是一个汉字先导字节呢?
procedure TForm1.Button3Click(Sender: TObject);
var
S : String;
PC : PChar;
res : Bool;
i : integer;
begin
S := '你好';
PC := PChar(S);
for i := 0 to 3 do
begin
res := IsDBCSLeadByte(Byte(Pc));
if res = true then
ShowMessage('IsLead')
else
ShowMessage('Not Lead');
end;
end;
每次是Islead
我如何才能当前字节是一个汉字先导字节呢?