View Issue Details

IDProjectCategoryView StatusLast Update
0038133FPCRTLpublic2020-11-29 22:36
ReporterBi0T1N Assigned ToMichael Van Canneyt  
Status assignedResolutionopen 
Product Version3.3.1 
Summary0038133: Duplicate function for HexToBin and BinToHex
DescriptionI'm not really sure, maybe there is a reason for this but in rtl/objpas/classes/ there is

function LineStart(Buffer, BufPos: PChar): PChar;
procedure BinToHex(BinValue, HexValue: PChar; BinBufSize: Integer);

with the implementation in rtl/objpas/classes/
Exactly the same appears again in packages/rtl-objpas/src/inc/strutils.pp - so maybe remove one of it to avoid code duplication?
TagsNo tags attached.
Fixed in Revision
Attached Files


related to 0038150 assignedMichael Van Canneyt [Patch] Implement BinToHex overloads for Delphi compatibility 


Sven Barth

2020-11-25 23:10

manager   ~0127192

I assume you meant HexToBin instead of LineStart? ;)

For what it's worth: Delphi has them in unit Classes (though Delphi does not seem to have the other overloads we have in StrUtils).

Also Delphi supports quite some more overloads:
Same also for HexToBin:


2020-11-26 16:26

reporter   ~0127199

Oh yes, you're absolutely right - I've copied the wrong line. Should be

procedure BinToHex(BinValue, HexValue: PChar; BinBufSize: Integer);
function HexToBin(HexValue, BinValue: PChar; BinBufSize: Integer): Integer;

Correct, that's how I've stumbled about it as I wanted to provide the missing overloads...

Issue History

Date Modified Username Field Change
2020-11-25 16:33 Bi0T1N New Issue
2020-11-25 23:10 Sven Barth Note Added: 0127192
2020-11-26 16:26 Bi0T1N Note Added: 0127199
2020-11-29 22:30 Michael Van Canneyt Assigned To => Michael Van Canneyt
2020-11-29 22:30 Michael Van Canneyt Status new => assigned
2020-11-29 22:36 Michael Van Canneyt Relationship added related to 0038150