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

✨ XmStringCreateLtoR ✨

okay bestie, welcome to the XmStringCreateLtoR(library call) page πŸ’– it's a compound string function, and yes it makes a compound string, we love a self-explanatory queen πŸ‘‘


🌸 NAME 🌸

XmStringCreateLtoR β€” a compound string function that creates a compound string. she does exactly what it says on the tin, no cap πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

#include <Xm/Xm.h>
XmString XmStringCreateLtoR(
char *text,
char *tag);

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so first thing, and I need you to hear me on this one: this function is obsolete 😭 it's literally just here for compatibility with previous releases, hanging around like that one ex who never fully leaves the group chat. she's been replaced by XmStringGenerate. periodt.

so what does she do? XmStringCreateLtoR creates a compound string with two components: text and a tag component. that's the whole vibe, two ingredients, iconic.

here's the lil party trick: the function scans for \n characters in the text πŸ‘€ and when it finds one, the text up to that point gets put into a segment, followed by a separator component. it's giving "chop it at the newline, bestie."

no final separator component is appended to the end of the compound string. like, the last one? doesn't get a separator. that's just the rules 🫢

the direction component defaults to left-to-right. and β€” important β€” this function assumes that the encoding is single byte rather than multibyte, so don't come at her with multibyte text, she will simply not cope πŸ™ˆ

also, the function will allocate space to hold the returned compound string. that space is now your problem, bestie β€” the application is responsible for managing the allocated space πŸ’€ you can recover it by calling XmStringFree. please actually call it, I'm begging.

  • text β€” specifies a NULL-terminated string to be used as the text component of the compound string. this is the actual words, the content, the main character ✨
  • tag β€” specifies the tag component to be associated with the given text. the value XmFONTLIST_DEFAULT_TAG is retained for compatibility with previous releases, because we simply cannot let go of the past around here πŸ’œ

πŸ‘‘ RETURN πŸ‘‘

returns a new compound string. brand new, fresh out the box, slay πŸŽ€


XmStringCreate(3) and XmStringGenerate(3) β€” go read those too, they're the friend group πŸ’–


mwah, that's the whole page!! this was the XmStringCreateLtoR(library call) manual page, brought to you by the library call girlies β€” go forth and free your compound strings πŸŒΈπŸ’…πŸ¦‹