XMSTRINGNCONCAT(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

πŸ’– 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 of s2 is appended. the base. the foundation. the main character πŸŽ€
  • s2 β€” specifies the compound string that is appended to the end of s1. the guest star making an entrance at the back of the line ✨
  • num_bytes β€” specifies the number of bytes of s2 to append to s1. okay but here's the tea: if this value is less than the length of s2, 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. 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 πŸ’–



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 πŸ‘‘πŸ¦‹