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

# XmStringCompare(3)

A compound string function that compares two strings

## NAME

**XmStringCompare** — A compound string function that compares two strings

## SYNOPSIS

```
#include <Xm/Xm.h>
Boolean XmStringCompare(
XmString s1,
XmString s2);
```

## DESCRIPTION

**XmStringCompare** returns a Boolean value indicating the results of a semantically equivalent comparison of two compound strings.

Semantically equivalent means that the strings have the same text components, font list element tags, directions, and separators. In general, if two compound strings are created with the same (**char \***) string using **XmStringCreateLocalized** in the same language environment, the compound strings compare as equal. If two compound strings are created with the same text and tag argument using **XmStringCreate**, the strings compare as equal.

- *s1*

  Specifies a compound string to be compared with *s2*

- *s2*

  Specifies a compound string to be compared with *s1*

## RETURN

Returns True if two compound strings are equivalent.

## RELATED

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