XMSTRINGTOXMSTRINGTABLE(3)
β¨ XmStringToXmStringTable β¨
okay bestie, so this one's a library call from the Xm crew, and it's literally just a convenience function that takes one compound string and turns it into a whole table of compound strings π she's giving split-and-conquer, no cap.
πΈ NAME πΈ
XmStringToXmStringTable β a convenience function that converts a single compound string to a table of compound strings π
π¦ SYNOPSIS π¦
#include <Xm/Xm.h>
Cardinal XmStringToXmStringTable(
XmString string,
XmString break_component,
XmStringTable *table);
π DESCRIPTION π
So like, XmStringToXmStringTable takes a single compound string plus a specified string component (think: a tab, iykyk) as input, and hands you back a table of compound strings. That table is made up of the portions of string that are delimited by components matching break_component. And here's the tea: the components that mark the breaks will not appear in the resulting table. they're gone, they did their job, they left π
stringβ specifies theXmStringto be converted β¨break_componentβ specifies theXmStringComponentthat will be used to indicate where to splitstringto form the individual elements oftable. The most useful types will beXmSTRING_COMPONENT_SEPARATORandXmSTRING_COMPONENT_TABπ― Refer to theXmStringComponentType(3)reference page for a complete list of possible component types. Note, however, that theXmSTRING_COMPONENT_UNKNOWNcomponent is not a possible type π (so don't try it, babe)tableβ returns the equivalentXmStringTable. The function will allocate space to hold the returnedXmStringTableπ¦ When the application no longer needs the returnedXmStringTable, the application should callXmStringFreeonce for each compound string in the table, and then callXtFreeto deallocate theXmStringTableitself.
β οΈ bestie listen β that cleanup is not optional. OneXmStringFreeper compound string in the table, and thenXtFreeon theXmStringTableitself. skip it and you're leaking memory like it's a personality trait π
π RETURN π
Returns the number of compound strings in table π― (yes she tells you the count, she's helpful like that)
π RELATED π
and that's the whole thing, bestie!! π«Ά this page is a library call (like, the manual section vibe is literally "library call", periodt), and that's your sign-off β go split some compound strings and slay πβ¨ππ¦πΈπ
π¦ where this page comes from
- arch rolling: openmotif 2.3.8-4 Β· LGPL-2.1-or-later
- centos-stream 9: motif-devel 2.3.4-32.el9 Β· LGPLv2+
- centos-stream 9: motif-devel 2.3.4-32.el9 Β· LGPLv2+
- epel 10: motif-devel 2.3.8-2.el10_2 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-1.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-1.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-2.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-2.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 44: motif-devel 2.3.8-3.fc44 Β· LicenseRef-Callaway-LGPLv2+
- fedora 44: motif-devel 2.3.8-3.fc44 Β· LicenseRef-Callaway-LGPLv2+
- nixos 26.05: motif 2.3.8
- nixpkgs unstable: motif 2.3.8
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms