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

# XmStringGenerate(3)

A convenience function that generates a compound string

## NAME

**XmStringGenerate** — A convenience function that generates a compound string

## SYNOPSIS

```
#include <Xm/Xm.h>
XmString XmStringGenerate(
XtPointer text,
XmStringTag tag,
XmTextType type,
XmStringTag rendition);
```

## DESCRIPTION

**XmStringGenerate** calls the **XmStringParseText** function with a default parse table of entries consisting of '0&', which maps to Separator, and ' ', which maps to Tab. Matching **RENDITION\_BEGIN** and **RENDITION\_END** components containing *rendition* are placed around the resulting **XmString**.

- *text*

  Specifies a NULL-terminated string containing characters of a type determined by *type*.

- *tag*

  Specifies the tag to be used in creating the result. The type of tag created (charset or locale) depends on the text type and the value given. If specified value is NULL, and *type* indicates that a charset tag should be created, then the tag will have the value of **XmFONTLIST\_DEFAULT\_TAG**. If *tag* is NULL, and *type* indicates a locale tag, then the tag will have the value of **\_MOTIF\_DEFAULT\_LOCALE**.

- *type*

  Specifies the type of text to be passed in, and the tag type. If a locale tag should be created, then *type* has a value of either **XmMULTIBYTE\_TEXT** or **XmWIDECHAR\_TEXT**. If a charset should be created, *type* has a value of **XmCHARSET\_TEXT**.

- *rendition*

  Specifies the rendition tag to be used in an **XmSTRING\_COMPONENT\_RENDITION\_BEGIN** component which will begin the returned string and in an **XmSTRING\_COMPONENT\_RENDITION\_END** component which will end it. If *rendition* is NULL, no rendition tag is placed.

## RETURN

Returns a new compound string. The function will allocate space to hold the returned compound string. When the application no longer needs the returned compound string, the application should call **XmStringFree**.

## RELATED

[**XmString**(3)](/XmString/3.md) and [**XmStringFree**(3)](/XmStringFree/3.md).
