IntToBin

Converts an integer to a binary string representation, inserting spaces at fixed locations.

Declaration

Source position: strutils.pp line 222

  function IntToBin(Value: LongInt; Digits: Integer; Spaces: Integer)
                    : string;
  function IntToBin(Value: LongInt; Digits: Integer) : string;
  function intToBin(Value: Int64; Digits: Integer) : string;

Description

IntToBin converts Value to a string with it's binary (base 2) representation. The resulting string contains Digits digits, with spaces inserted every Spaces digits. Spaces equal to zero yields a result without spacing. If Digits is larger than 32, it is truncated to 32.

See also

Name Description
Hex2Dec Converts a hexadecimal string to a decimal value
IntToRoman Represent an integer with roman numerals