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

# XmCvtStringToUnitType(3)

A function that converts a string to a unit-type value

## NAME

**XmCvtStringToUnitType** — A function that converts a string to a unit-type value

## SYNOPSIS

```
#include <Xm/Xm.h>
void XmCvtStringToUnitType(
XrmValuePtr args,
Cardinal * num_args,
XrmValue * from_val,
XrmValue * to_val);
```

## DESCRIPTION

**XmCvtStringToUnitType** converts a string to a unit type. Refer to the reference pages for **XmGadget**, **XmManager**, or **XmPrimitive** for a description of the valid unit types. Use of this function as a resource converter is obsolete. It has been replaced by a new resource converter that uses the RepType facility.

- *args*

  Specifies a list of additional **XrmValue** arguments to the converter if additional context is needed to perform the conversion. For example, the string-to-font converter needs the widget's screen and the string-to-pixel converter needs the widget's screen and color map. This argument is often NULL.

- *num\_args*

  Specifies the number of additional **XrmValue** arguments. This argument is often zero.

- *from\_val*

  Specifies the value to convert

- *to\_val*

  Specifies the descriptor to use to return the converted value

## RELATED

[**XmGadget**(3)](/XmGadget/3.md), [**XmManager**(3)](/XmManager/3.md), and [**XmPrimitive**(3)](/XmPrimitive/3.md).
