---
title: "strunpack | open.mp"
description: "This function can be used to unpack a string."
canonical: https://omp.itsneufox.com/docs/scripting/functions/strunpack
language: en
---

# strunpack

## Description

This function can be used to unpack a string.

| Name | Description |
| --- | --- |
| dest\[\] | The destination string to save the unpacked string in, passed by reference. |
| const source\[\] | The source, original packed string. |
| maxlength = sizeof (dest) | The maximum size to insert. |

## Returns

The number of characters packed.

## Examples

```c
new string[17];
new pstring[17 char] = !"Hi, how are you?";
strunpack(string, pstring);
```

## Related Functions

-   [ispacked](https://omp.itsneufox.com/docs/scripting/functions/ispacked): Check if the given string is packed.
-   [strpack](https://omp.itsneufox.com/docs/scripting/functions/strpack): This function can be used to pack a string.
-   [strcmp](https://omp.itsneufox.com/docs/scripting/functions/strcmp): Compare two strings to check if they are the same.
-   [strfind](https://omp.itsneufox.com/docs/scripting/functions/strfind): Search for a string in another string.
-   [strins](https://omp.itsneufox.com/docs/scripting/functions/strins): Insert text into a string.
-   [strlen](https://omp.itsneufox.com/docs/scripting/functions/strlen): Get the length of a string.
-   [strmid](https://omp.itsneufox.com/docs/scripting/functions/strmid): Extract part of a string into another string.
-   [strpack](https://omp.itsneufox.com/docs/scripting/functions/strpack): Pack a string into a destination string.
-   [strval](https://omp.itsneufox.com/docs/scripting/functions/strval): Convert a string into an integer.
-   [strcat](https://omp.itsneufox.com/docs/scripting/functions/strcat): Concatenate two strings into a destination reference.
-   [strdel](https://omp.itsneufox.com/docs/scripting/functions/strdel): Delete part of a string.
