|
@@ -17,6 +17,18 @@ begin
|
|
Result := Result and (B[I] = Etalon[I]);
|
|
Result := Result and (B[I] = Etalon[I]);
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+function CheckWideBytes(const B: TBytes): Boolean;
|
|
|
|
+const
|
|
|
|
+ Etalon: array[0..7] of Byte = (84, 00, 101, 00, 115, 00, 116, 00);
|
|
|
|
+var
|
|
|
|
+ I: Integer;
|
|
|
|
+begin
|
|
|
|
+ Result := Length(B) <= Length(Etalon);
|
|
|
|
+ if Result then
|
|
|
|
+ for I := Low(B) to High(B) do
|
|
|
|
+ Result := Result and (B[I] = Etalon[I]);
|
|
|
|
+end;
|
|
|
|
+
|
|
var
|
|
var
|
|
S: AnsiString;
|
|
S: AnsiString;
|
|
U: UnicodeString;
|
|
U: UnicodeString;
|
|
@@ -36,4 +48,7 @@ begin
|
|
B := BytesOf(U[1]);
|
|
B := BytesOf(U[1]);
|
|
if not CheckBytes(B) then
|
|
if not CheckBytes(B) then
|
|
halt(4);
|
|
halt(4);
|
|
|
|
+ B := WideBytesOf(U);
|
|
|
|
+ if not CheckWideBytes(B) then
|
|
|
|
+ halt(5);
|
|
end.
|
|
end.
|