XMSTRINGNCONCAT(3)
π XmStringNConcat π
okay bestie, so this is a page from the XmStringNConcat(library call) manual, and it's all about a compound string function that appends a specified number of bytes to a compound string. yes that's a mouthful, we'll get through it together π«Ά
β¨ NAME β¨
XmStringNConcat β a compound string function that appends a specified number of bytes to a compound string
πΈ SYNOPSIS πΈ
#include <Xm/Xm.h>
XmString XmStringNConcat(
XmString s1,
XmString s2,
int num_bytes);
π DESCRIPTION π
so, real talk first: this function is obsolete π it literally only still exists so old code doesn't break β it's here for compatibility with previous releases. it got replaced by XmStringConcat, so if you're writing something new, go hang out with that one instead. but if you're here, you're here, and I respect the legacy π
what it does: XmStringNConcat appends a specified number of bytes from s2 onto the end of s1 β and that includes the tags, the directional indicators, and the separators, all of it, no crumbs left behind β¨ then it hands you back the resulting compound string.
the original strings? untouched. preserved. not a single byte harmed π
it allocates space for the resulting compound string β so the application is responsible for managing that allocated space. that's on you, bestie, not on the function. when you're done with it, you can recover that allocated space by calling XmStringFree. free your space, cleanse your soul π§
here's the parameter breakdown:
s1β specifies the compound string to which a copy ofs2is appended. the base. the foundation. the main character πs2β specifies the compound string that is appended to the end ofs1. the guest star making an entrance at the back of the line β¨num_bytesβ specifies the number of bytes ofs2to append tos1. okay but here's the tea: if this value is less than the length ofs2, then as many bytes as possible β but possibly fewer than this value β will be appended tos1, such that the resulting string is still a valid compound string. so it's not gonna just hack your string in half mid-structure, it's gonna do the polite thing and stop somewhere sensible π«Ά lowkey thoughtful of it ngl
β RETURN β
Returns a new compound string. brand new, freshly allocated, all yours to manage π
π RELATED π
and that's the whole page babes π this was XmStringNConcat(library call), from the XmStringNConcat(library call) manual β obsolete icon, still serving looks, still keeping old code alive. go free your strings, drink some water, ily ππ¦
π¦ 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