|
@@ -34,16 +34,19 @@ end;
|
|
|
|
|
|
var
|
|
|
e, i , j: Integer;
|
|
|
+ count : int64;
|
|
|
s : UnicodeString;
|
|
|
begin
|
|
|
s := 'azerty12345';
|
|
|
e := 1;
|
|
|
+ count:=0;
|
|
|
for i := HIGH_SURROGATE_BEGIN to HIGH_SURROGATE_END do begin
|
|
|
for j := LOW_SURROGATE_BEGIN to LOW_SURROGATE_END do begin
|
|
|
s[3] := UnicodeChar(i);
|
|
|
s[4] := UnicodeChar(j);
|
|
|
if not TCharacter.IsSurrogatePair(s,3) then
|
|
|
DoError(e,i,j);
|
|
|
+ inc(count);
|
|
|
end;
|
|
|
end;
|
|
|
|
|
@@ -56,10 +59,11 @@ begin
|
|
|
s[6] := UnicodeChar(j*dist);
|
|
|
if TCharacter.IsSurrogatePair(s,5) then
|
|
|
DoError(e,i*dist,j*dist);
|
|
|
+ inc(count);
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
- WriteLn('ok');
|
|
|
+ WriteLn('ok, count=',count);
|
|
|
end.
|