XMSTRINGGETLTOR(3)

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

✨ NAME ✨

XmStringGetLtoR β€” a compound string function that goes looking for a text segment inside the compound string you hand it πŸ’… (it's the XmStringGetLtoR(library call) page, bestie, and we're gonna get through it together)


🌸 SYNOPSIS 🌸

#include <Xm/Xm.h>
Boolean XmStringGetLtoR(
XmString string,
XmStringCharSet tag,
char **text);

πŸ’– DESCRIPTION πŸ’–

okay so first thing, and I need you to hear me on this one: this function is obsolete 😭 it literally only still exists for compatibility with previous releases, like that group chat you can't leave because of one person. it's been replaced by XmStringUnparse, so if you're writing new code, go there instead, fr fr.

so what does it do? XmStringGetLtoR returns the first text component in the input compound string that's tagged with the tag component you gave it. the returned text is meant to be a NULL-terminated sequence of single byte characters.

and here's the part where you gotta pay attention πŸ‘€ if the function returns True, it will allocate space to hold the returned text. the application is responsible for managing that allocated space β€” that's on you, bestie, not on the library. you can recover the allocated space by calling XtFree. don't forget, or it's giving memory leak energy πŸ’€

  • string β€” specifies the compound string. that's the one we're digging through πŸ¦‹
  • tag β€” specifies the font list element tag associated with the text. a value of XmFONTLIST_DEFAULT_TAG identifies a locale text segment ✨
  • text β€” specifies a pointer to a NULL terminated string

πŸŽ€ RETURN πŸŽ€

returns True if the matching text segment can be found πŸ”₯ and on return, text will have a NULL terminated byte sequence containing the matched segment. iconic. that's it, that's the whole return value.



and that's the whole page, no cap πŸ’œ this was the XmStringGetLtoR(library call) manual page β€” library call vibes, straight from the Xm docs, and yes I read the whole thing so you don't have to. go call XtFree when you're done, I'm literally begging πŸ™ˆ πŸŽ€βœ¨