ZSysUtils.EndsWith bug

In this forum all bug reports concerning the 6.x branch will be gahtered. You have the possibility to track the bug fix process.

Moderators: EgonHugeist, mdaems

Post Reply
AHUser
Fresh Boarder
Fresh Boarder
Posts: 12
Joined: 11.04.2006, 00:33

ZSysUtils.EndsWith bug

Post by AHUser »

If you call ZSysUtils.EndsWith with two empty strings, the function returns True. But Delphi's AnsiEndsStr and StrUtils.EndsStr returns False in that case.

Code: Select all

uses
  StrUtils, ZSysUtils;
Assert( EndsWidth('', '') = EndsStr('', '') ); // => fails
Is this intended or is it a bug?

BTW: I'm optimizing the function to not copy anything but only compare.
Post Reply