libHX is a C and C++ library with utility functions for maps, deques, linked lists, string formatting and autoresizing, command-line option parsing, config file parsing, type checking casts and more.
Resources
- Latest release: 5.2 (2025-10-19)
- Many Linux distributions already ship packages — just use their package system! See the Distro Availability Matrix [repology.org].
- Source code release archive
- Git source code repository – https://codeberg.org/jengelh/libhx
- Git source code repository – https://git.inai.de/libhx (clone only; no webview)
Components (by all means not all)
- socket auxiliary functions for daemons switching to unprivileged mode
- rb-tree based map/set, hash-based unordered_map/unordered_set (
HXmap_*) - doubly-linked lists with independent or inline information nodes
(
HXdeque_*, code>HXlist_*,HXclist_*) - multiplatform directory handling (
HXdir_*), open-read, mkdir -p, rm -Rf - string formatter with string and function placeholders (
HXformat_*) - memory containers, auto-sizing string type (
HXmc_*) - option parsing (
HXoption_*), table-based with optional callbacks, long options available. - socket utility function for trivial listening and connecting
- shellconfig parser (
HXshconfig_*), a parser for /etc/sysconfig. - string operation library: e.g.
basename,chomp,dirname,getl(ine),split,strlower/-upper,str*trim,strsep,strsep2, etc.