int2hex()

Purpose

int2hex(num)

Returns a hexadecimal number string of a given positive integer num.

Note

When a negativ integer is given the return value will be the Two’s complement of the input number.

Example

Positive Integer given

In the following example the hexadecimal number of 61 is returned as a string.

int2hex(61)

produces

3d

Negative Integer given

This example shows the result on a 64-bit system when a negative integer such as -13 is put into the function.

int2hex(-13)

produces

fffffffffffffff3

See also

Help with configuring/using Rsyslog:

See also

Contributing to Rsyslog:

Copyright 2008-2023 Rainer Gerhards (Großrinderfeld), and Others.