Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
fpc-src / usr / share / fpcsrc / 3.0.0 / tests / test / tcpstr16.pp
Size: Mime:
program tcpstr16;
{$mode delphi}
{$codepage cp1251}
{$apptype console}
type
  T866String = type AnsiString(866);
  T1251String = type AnsiString(1251);

function Compare(const S1, S2: RawByteString): Boolean;
begin
  Result :=
    (Length(S1) = Length(S2)) and
    (CompareByte(S1[1],S2[1],Length(S1))=0);
end;

begin
  if Compare(T866String('ïðèâåò'), 'ïðèâåò') then
    halt(1);
  if not Compare(AnsiString(T866String('ïðèâåò')), 'ïðèâåò') then
    halt(2);
end.