XMSTRINGNCOPY(3)

πŸ“¦
version 2.3.8 Β· 3 versions
, in arch rolling, centos-stream 9, epel 10, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0

πŸ’– 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 of s1 to copy. Now here's the lil plot twist: if this value is less than the length of s1, then as many bytes as possible β€” but possibly fewer than this value β€” will be appended to s1, 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. πŸ‘‘



kisses bestie, this was XmStringNCopy from the library call manual β€” go forth and free your strings πŸ’…πŸŽ€βœ¨