---
name: "fmt_xlong"
section: "3"
platform: "linux"
package: "libowfat-dev"
version: "0.32-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/fmt_xlong"
---

# fmt\_xlong(3)

write a hexadecimal ASCII representation of an unsigned long integer

## NAME

fmt\_xlong - write a hexadecimal ASCII representation of an unsigned long integer

## SYNTAX

**#include \<libowfat/fmt.h\>**

size\_t **fmt\_xlong**(char \**dest*,unsigned long *source*);

## DESCRIPTION

fmt\_xlong writes an ASCII representation ('0' to '9' and 'a' to 'f', base 16) of *source* to *dest* and returns the number of bytes written.

fmt\_xlong does not append \\0.

If *dest* equals FMT\_LEN (i.e. is zero), fmt\_xlong returns the number of bytes it would have written.

For convenience, fmt.h defines the integer FMT\_XLONG to be big enough to contain every possible fmt\_xlong output plus \\0.

## SEE ALSO

[scan\_xlong(3)](/scan_xlong/3.md)
