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

πŸ’– XmDataFieldGetString πŸ’–

okay bestie, welcome to the library call corner of the man pages, where we're talking about XmDataFieldGetString β€” a DataField function that accesses the string value. yes, that's the whole name up top, no notes, we love a descriptive queen πŸ‘‘


✨ NAME ✨

XmDataFieldGetString β€” a DataField function that accesses the string value πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <Xm/DataF.h>
char * XmDataFieldGetString(
Widget widget);

like... that's it. two lines. the way she's so unbothered πŸ’…


🌸 DESCRIPTION 🌸

So XmDataFieldGetString accesses the string value of the DataField widget. that's her whole job and she does it flawlessly, no cap ✨

⚠️ MAJOR note, bestie, listen up: the application is responsible for freeing the storage associated with the string by calling XtFree. like, you have to do it. she hands you the string and then she's done, it's your problem now 😭 don't come crying to me about memory leaks, i warned you fr fr.

widget β€” specifies the DataField widget ID 🫢

For a complete definition of DataField and its associated resources, see XmDataField(3). go read it, i'll wait 🧚


πŸ‘‘ RETURN πŸ‘‘

She returns a character pointer to the string value of the DataField widget. ✨

And here's the tea: this returned value is a copy of the value of the XmNvalue resource. a copy. not the original. so yeah β€” free it, like we said. 🫠

She returns an empty string if the length of the DataField widget's string is 0 (zero). empty string! not NULL! that distinction is literally the whole vibe check 🌈


(the Wcs one is her wide-character sister, iconic family honestly πŸ‘―)


k that's the whole page, bestie!! this was the XmDataFieldGetString(library call) page, filed under the library call fam, and yes the footer says the exact same thing as the header because man pages love a symmetrical moment πŸ’€ anyway ily, go free your strings, mwah πŸ’–βœ¨πŸŽ€