∧,,∧    / 
  _ ミ;゚Д゚彡_<  こうかな....
.=| |==U==U=| |= \ もう面倒すぎっす....
 | |@ミ  ミ .| |   
 | | ∪''∪ | |  ByteType比較で失敗する
 | |      | |  テストコード用意スル気力はないです...

function AnsiStringPartsCompare_Base(const S1, S2: String;
S1Index, S2Index, StrLength: Integer): Boolean;
var i: Integer; ByteTypeBuffer: TMbcsByteType;
begin
 if CompareStringA(LOCALE_USER_DEFAULT, 0,
  PChar(S1) + S1Index - 1, StrLength,
  PChar(S2) + S2Index - 1, StrLength) = 2 then
 begin
  i := 0;  while i <= StrLength -1 do
  begin
   ByteTypeBuffer := ByteType(S1, S1Index+i);
   if ByteTypeBuffer <> ByteType(S2, S2Index+i) then
   begin    Result := False;    Exit;   end;
   if ByteTypeBuffer = mbLeadByte then Inc(I);
   Inc(I);
  end;
  Result := True;
 end else
 begin  Result := False; end;
end;