XMSTRINGNCOPY(3)
π NAME π
XmStringNCopy β bestie, it's a compound string function that makes a whole new copy of a compound string. like a little photocopy but for your Xm strings π«Ά
(also hello, this is a library call, so it lives in section 3 of the manual, iykyk π )
β¨ SYNOPSIS β¨
#include <Xm/Xm.h>
XmString XmStringNCopy(
XmString s1,
int num_bytes);
πΈ DESCRIPTION πΈ
okay so first thing first, bestie: this function is obsolete π it's not the moment anymore. It literally only still exists for compatibility with previous releases. So if you're writing fresh code, no cap, go find the modern one. But if you're babysitting some ancient app, here's the tea. π
XmStringNCopy creates a copy of s1 that contains a specified number of bytes β and that count includes the tags, the directional indicators, and the separators. like, everything counts, no sneaky freebies. Then it returns the resulting compound string. β¨
The original strings are preserved β she does not touch your originals, she's respectful like that. π
The function allocates space for the resulting compound string. The application is responsible for managing the allocated space. And the application can recover the allocated space by calling XmStringFree. π§ basically: she books the hotel room, you have to check out. don't ghost it or that's a leak, fr fr π
s1β specifies the compound string. that's the one getting copied, bestie πnum_bytesβ specifies the number of bytes ofs1to copy. Now here's the lil plot twist: if this value is less than the length ofs1, 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. π
not me making sure the copy still passes the vibe check as a valid compound string though π she will not hand you back a broken one. as many bytes as she can fit, possibly fewer than you asked for, but always still valid. periodt.
π₯ RETURN π₯
Returns a new compound string. that's it, that's the whole meal. she ate. π
π¦ RELATED π¦
kisses bestie, this was XmStringNCopy from the library call manual β go forth and free your strings π
πβ¨
π¦ 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