---
name: "XmStringUnparse"
section: "3"
platform: "linux"
package: "openmotif"
version: "2.3.8-4"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/XmStringUnparse"
---

# XmStringUnparse(3)

A compound string function that unparses text

## NAME

**XmStringUnparse** — A compound string function that unparses text

## SYNOPSIS

```
#include <Xm/Xm.h>
XtPointer XmStringUnparse(
XmString string,
XmStringTag tag,
XmTextType tag_type,
XmTextType output_type,
XmParseTable parse_table,
Cardinal parse_count,
XmParseModel parse_model);
```

## DESCRIPTION

**XmStringUnparse** looks in the input *string* for text segments that are tagged with locale or charset tags that match *tag*. The *tag\_type* parameter specifies whether the tag is a locale or charset type. If *tag* has a value of NULL, all the segments are matched. When a text segment is found with a matching tag, it is added to the end of a resulting string. The characters in the resulting string are of type *output\_type*.

**XmStringUnparse** also checks *string* for components that match components in *parse\_table*, and also to see if the component matches the condition specified by *parse\_model*. If the string component matches in both checks, then the associated character is added to the end of the resulting string.

- *string*

  Specifies the **XmString** to be converted.

- *tag*

  Specifies the tag to be used in matching with text segments. Only text segments that match *tag* will be included in the resulting string. If *tag* has a value of NULL, all segments are considered as matches, and *tag\_type* is ignored.

- *tag\_type*

  Specifies the type of tag to be searched for, including **XmMULTIBYTE\_TEXT**, **XmWIDECHAR\_TEXT**, and **XmCHARSET\_TEXT**.

- *output\_type*

  Specifies the type of text to be returned in the string, including **XmMULTIBYTE\_TEXT**, **XmWIDECHAR\_TEXT**, and **XmCHARSET\_TEXT**.

- *parse\_table*

  Specifies the parse table to be used in scanning for compound string components to be converted to other characters.

- *parse\_count*

  Specifies how many entries are in *parse\_table*.

- *parse\_model*

  Specifies which non-text components to be considered in matching in *parse\_table*. These include:

  - **XmOUTPUT\_ALL**

    Puts out all matching components.

  - **XmOUTPUT\_BETWEEN**

    Puts out only those matching components that are between two matching text components.

  - **XmOUTPUT\_BEGINNING**

    Puts out only those matching components that are at the beginning of a matching text component.

  - **XmOUTPUT\_END**

    Puts out only those matching components that are at the end of a matching text component.

  - **XmOUTPUT\_BOTH**

    Puts out only those matching components that are at the beginning or end of a matching text component.

## RETURN

Returns a newly allocated string containing characters of a type determined by *output\_type*. The application is responsible for managing this allocated space. The application can recover this allocated space by calling **XtFree**.

## RELATED

[**XmString**(3)](/XmString/3.md), [**XmParseTable**(3)](/XmParseTable/3.md), [**XmParseMapping**(3)](/XmParseMapping/3.md).
