---
name: "ixp_pstrings"
section: "3"
platform: "linux"
package: "libixp-dev"
version: "0.6~20121202+hg148-5"
release: "Debian 11 (Bullseye)"
platforms: ["linux"]
url: "https://new.carta.tech/ixp_pstrings"
---

# ixp\_pstrings(3)

## NAME

ixp\_pstrings

## SYNOPSIS

```
#include <ixp.h>
void ixp_pstrings(IxpMsg *msg, uint16_t *num, char *strings[], uint max);
```

## DESCRIPTION

Packs or unpacks an array of UTF-8 encoded strings. The packed representation consists of a 16-bit element count followed by an array of strings as packed by **[ixp\_pstring(3)](/ixp_pstring/3.md)**. The unpacked representation is an array of nul-terminated character arrays.

If *msg*-\>mode is MsgPack, *\*num* strings in the array pointed to by *strings* are packed into the buffer at *msg*-\>pos. If *msg*-\>mode is MsgUnpack, *\*num* is loaded with the number of strings unpacked, the array at *\*strings* is loaded with pointers to the unpacked strings, and *(\*strings)\[0\]* must be freed by the user. In either case, *msg*-\>pos is advanced by the number of bytes read or written. If the action would advance *msg*-\>pos beyond *msg*-\>end, *msg*-\>pos is still advanced, but no other action is taken. If *\*num* is greater than *max*, *msg*-\>pos is set beyond *msg*-\>end and no other action is taken.

## SEE ALSO

*IxpMsg*, *ixp\_pstring*, *ixp\_pdata*
