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

# XmTextPosition(3)

Data type for a character position within a text string

## NAME

**XmTextPosition** — Data type for a character position within a text string

## SYNOPSIS

```
#include <Xm/Xm.h>
```

## DESCRIPTION

**XmTextPosition** is an integer data type that holds a character's position within a text string for Text and TextField.

An **XmTextPosition** value conceptually points to the gap between two characters. For example, consider a text string consisting of **N** characters. A value of 0 refers to the position immediately prior to the first character. A value of 1 refers to the position in between the first and second characters. A value of **N** refers to the position immediately following the last character. Therefore, the text string of **N** characters actually contains **N + 1** positions.

## RELATED

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