---
name: "libwget-stringmap"
section: "3"
platform: "linux"
package: "wget2-dev"
version: "2.2.0+ds-1+deb13u1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/libwget-stringmap"
---

# libwget-stringmap(3)

Stringmap functions

## NAME

libwget-stringmap - Stringmap functions

## SYNOPSIS

### 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).

## Author

Generated automatically by Doxygen for wget2 from the source code.
