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

# XmStringLineCount(3)

A compound string function that returns the number of separators plus one in the provided compound string

## NAME

**XmStringLineCount** — A compound string function that returns the number of separators plus one in the provided compound string

## SYNOPSIS

```
#include <Xm/Xm.h>
int XmStringLineCount(
XmString string);
```

## DESCRIPTION

**XmStringLineCount** returns the number of separators plus one in the provided compound string. In effect, it counts the lines of text.

- *string*

  Specifies the string

## RETURN

Returns the number of lines in the compound string. If *string* is empty, the function returns 1. If NULL is passed into *string*, the function returns 0 (zero).

## RELATED

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