XMSTRINGCONCATANDFREE(3)
β¨ NAME β¨
XmStringConcatAndFree β a compound string function that glues one string onto the end of another and then frees the originals, bestie π
π SYNOPSIS π
#include <Xm/Xm.h>
XmString XmStringConcatAndFree(
XmString s1,
XmString s2);
π DESCRIPTION π
okay so here's the vibe: XmStringConcatAndFree copies s2 to the end of s1 and hands you back a copy of the resulting compound string. and then β this is the part that makes it iconic β the original strings get freed. like, both of them. gone. slay β¨
the function will allocate space to hold the returned compound string, so bestie, that memory is yours to manage now. the application is responsible for managing the allocated space. π«Ά
and how do you give that space back? you call XmStringFree. that's it. that's the whole recovery arc π
s1β specifies the compound string to which a copy ofs2is appended. she's the main character, everything gets appended to her πs2β specifies the compound string that is appended to the end ofs1. she's the plus-one tagging along at the end πΈ
so here's the tea: XmStringConcatAndFree works like the XmStringConcat function, except that it frees the s1 and s2 strings, and is therefore more efficient. you should use XmStringConcatAndFree instead of XmStringConcat if you want s1 and s2 to be freed afterwards. no cap, that's literally the whole point. iykyk π₯
β οΈ heads up bestie: once this runs,s1ands2are freed. if you still needed them for something else, that's giving undefined-behaviour energy. plan accordingly π
π RETURN π
returns a new compound string. brand new. fresh out the box. periodt β¨
π¦ RELATED π¦
and that's the whole page, bestie!! this was XmStringConcatAndFree(library call) β a library call, in case the parentheses didn't already give it away π go forth, concat, and free responsibly πβ¨π
π¦ where this page comes from
- alpine 3.24: motif-doc 2.5.2-r0 Β· LGPL-2.1-or-later
- 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