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

# XmStringHasSubstring(3)

A compound string function that indicates whether one compound string is contained within another

## NAME

**XmStringHasSubstring** — A compound string function that indicates whether one compound string is contained within another

## SYNOPSIS

```
#include <Xm/Xm.h>
Boolean XmStringHasSubstring(
XmString string,
XmString substring);
```

## DESCRIPTION

**XmStringHasSubstring** indicates whether or not one compound string is contained within another.

- *string*

  Specifies the compound string to be searched

- *substring*

  Specifies the compound string to be searched for

## RETURN

Returns True if *substring* has a single text component and if its text is completely contained within any single text component of *string*; otherwise, it returns False.

## RELATED

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