libwget-stringmap(3)

libwget-stringmap3

Stringmap functions

Usage

Functions

wget_stringmap * wget_stringmap_create (int max)
wget_stringmap * wget_stringmap_create_nocase (int max)
typedef wget_hashmap wget_stringmap
Type of the stringmap.

Detailed Description

Stringmaps are key/value stores that perform at O(1) for insertion, searching and removing. The key is a C string.

These functions are a wrapper around the Hashmap API.

Function Documentation

wget_stringmap * wget_stringmap_create (int max)

Parameters

max Initial number of pre-allocated entries

Returns

New stringmap instance

Create a new stringmap instance with initial size max. It should be free'd after use with wget_stringmap_free().

The hash function is an efficient string hash algorithm originally researched by Paul Larson.

The compare function is strcmp(). The key strings are compared case-sensitive.

wget_stringmap * wget_stringmap_create_nocase (int max)

Parameters

max Initial number of pre-allocated entries

Returns

New stringmap instance

Create a new stringmap instance with initial size max. It should be free'd after use with wget_stringmap_free().

The hash function is an efficient string hash algorithm originally researched by Paul Larson, using lowercase'd keys.

The compare function is strcasecmp() (case-insensitive).

Releases

4 releases since Debian 10 (Buster); the text changed 2 times.

  1. 10
  2. 11–12
  3. 13

Author

Generated automatically by Doxygen for wget2 from the source code.

From wget2-dev 2.2.0+ds-1+deb13u1 in Debian 13 (Trixie). Parsed by carta from the page's man source.