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

# XmStringWidth(3)

A compound string function that returns the width of the widest line in a compound string

## NAME

**XmStringWidth** — A compound string function that returns the width of the widest line in a compound string

## SYNOPSIS

```
#include <Xm/Xm.h>
Dimension XmStringWidth(
XmRenderTable rendertable,
XmString string);
```

## DESCRIPTION

**XmStringWidth** returns the width, in pixels, of the widest line in the provided compound string.

- *rendertable*

  Specifies the render table

- *string*

  Specifies the string

## RETURN

Returns the width of the compound string.

## RELATED

[**XmStringCreate**(3)](/XmStringCreate/3.md).
