| Int2Hex Routines | 
Unit
QESBPCSConvert
| Overloaded Variants | 
| Function Int2Hex(const L: LongInt; const Len: Byte): string; | 
| Function Int2Hex(const L: Int64; const Len: Byte): string; | 
Declaration
Function Int2Hex(const L: LongInt; const Len: Byte): string;
Description
ESBBlankWhenZero can be set to True to have Zero returned as a string of blanks.
| Parameters | 
| L | Value to Convert to String. | 
| Len | is the length of the resultant string. If it is too small then valid digits will be truncated from the right. | 
Category
String/Integer Conversion RoutinesImplementation
 
| function Int2Hex (const L: LongInt; const Len: Byte): string;
begin
     if ESBBlankWhenZero and (L = 0) then
     begin
          Result := BlankStr (Len);
          Exit;
     end;
     Result := PadChLeftStr (LeftStr (Int2EHex (L), Len), ESBNumPadCh, Len);
End; | 
Declaration
Function Int2Hex(const L: Int64; const Len: Byte): string;Implementation
 
| function Int2Hex (const L: Int64; const Len: Byte): string;
begin
     if ESBBlankWhenZero and (L = 0) then
     begin
          Result := BlankStr (Len);
          Exit;
     end;
     Result := PadChLeftStr (LeftStr (Int2EHex (L), Len), ESBNumPadCh, Len);
End; | 
|  |