int2hex() — rsyslog 8.2102.0 documentation

# 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`:

- Mailing list - best route for general questions
- GitHub: rsyslog source project - detailed questions, reporting issues that are believed to be bugs with `Rsyslog`
- Stack Exchange (View, Ask) - experimental support from rsyslog community

See also

Contributing to `Rsyslog`:

- Source project: rsyslog project README.
- Documentation: rsyslog-doc project README

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