|
Тема |
Re: Защо ? [re: Waz Gaa] |
|
Автор |
NDeu (член) |
|
Публикувано | 08.05.03 15:55 |
|
|
The Delphi language supports single-byte and multibyte characters and strings through the Char, PChar, AnsiChar, PAnsiChar, and AnsiString types. Indexing of multibyte strings is not reliable, since S[ i] represents the ith byte (not necessarily the ith character) in S.
Затова пък гледай:
procedure TForm1.Button1Click(Sender: TObject);
const
char:WideChar=#$03b5;
var
i: Integer;
text :WideString;
begin
//text:=WideString(#$00c0#$0152)+char+WideString(#$0007);
text:=WideString(#$00c0)+WideString(#$0152)+char+WideString(#$0007);
for i := 1 to Length(text)
do begin
ShowMessage('Ord(Char)='+IntToStr(ord(Char))+' Char=<'+char+'>'#13
+'Ord(Text[ i])='+IntToStr(ord(Text[ i]))+' Text['+IntToStr(i)+']=<'+text[ i]+'>');
if char = text[ i] then Button1.Caption := 'ok';
end;
end;
Редактирано от NDeu на 08.05.03 16:15.
|
| |
|
|
|