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

# XmStringLength(3)

A compound string function that obtains the length of a compound string

## NAME

**XmStringLength** — A compound string function that obtains the length of a compound string

## SYNOPSIS

```
#include <Xm/Xm.h>
int XmStringLength(
XmString s1);
```

## DESCRIPTION

This function is obsolete and exists for compatibility with previous releases. It is replaced by **XmStringByteStreamLength**. **XmStringLength** obtains the length of a compound string. It returns the number of bytes in *s1* including all tags, direction indicators, and separators. If the compound string has an invalid structure, 0 (zero) is returned.

- *s1*

  Specifies the compound string

## RETURN

Returns the length of the compound string.

## RELATED

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