XMSTRINGPARSETEXT(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 🌸

XmStringParseText β€” bestie, this is the function that takes a plain ol' character string and turns it into a compound string. it's giving glow-up πŸ’…


✨ SYNOPSIS ✨

#include <Xm/Xm.h>
XmString XmStringParseText(
XtPointer text,
XtPointer *text_end,
XmStringTag tag,
XmTextType type,
XmParseTable parse_table,
Cardinal parse_count,
XtPointer call_data);

πŸ’– DESCRIPTION πŸ’–

okay so. XmStringParseText takes the characters you put in text and converts them into the matching components in the compound string it hands back 🫢. The compound string you get back is made of at least one locale or charset tag component, plus a whole series of XmString text components and other components. How does it know what to convert? It follows the parse info chillin' inside parse_table. fr fr, if you want the deep lore on parsing and parse tables, go read the Motif Programmer's Guide πŸ“š.

  • If type is XmCHARSET_TEXT, then the associated tag is interpreted as a charset name. And if tag has a value of NULL? Then a charset component gets created whose value is the result of mapping XmFONTLIST_DEFAULT_TAG. periodt ✨
  • If type is XmMULTIBYTE_TEXT or XmWIDECHAR_TEXT, then the associated tag is interpreted as a language environment name. If tag has a value of NULL, a locale component gets created with a value of _MOTIF_DEFAULT_LOCALE. And heads up bestie, if type is XmMULTIBYTE_TEXT or XmWIDECHAR_TEXT, then tag must be NULL or _MOTIF_DEFAULT_LOCALE. no negotiating 😀

XmStringParseText also scans the string for characters that have matches in parse_table. Whenever a match is found, the text up to that point is concatenated with the mapped component πŸ”₯. iconic behavior honestly.

  • text β€” Specifies the NULL-terminated string containing characters of a type determined by type. This is updated to point to after the last character scanned. she moves on, she doesn't look back πŸ’…
  • text_end β€” Specifies a pointer into text. If a NULL is supplied to the text_end parameter, then XmStringParseText parses text until NULL is encountered, or until it reaches a point in text where it is directed to stop (for example, by a parse_proc). Otherwise, the value supplied to the text_end parameter is the pointer into text where parsing is to stop, and the returned character is the one where parsing did stop πŸ‘‘
  • tag β€” Specifies the tag to be used in creating the result. The type of string tag created (charset or locale) depends on the text type and the passed in tag value. If the tag value is NULL and if type indicates that a charset string tag should be created, the string tag has the value that is the result of mapping XmFONTLIST_DEFAULT_TAG. If type indicates a locale string tag, the string tag has the value _MOTIF_DEFAULT_LOCALE πŸŽ€
  • type β€” Specifies the type of text and the tag type. If a locale tag should be created, type has a value of either XmMULTIBYTE_TEXT or XmWIDECHAR_TEXT. If type has value of XmCHARSET_TEXT, a charset tag will be created 🌈
  • parse_table β€” Specifies the parse table to be used in scanning for characters to be converted to other compound string components. this is the little lookup bestie that decides who gets a makeover πŸ’–
  • parse_count β€” Specifies the number of entries in parse_table. count 'em, don't lie about 'em πŸ”’
  • call_data β€” Specifies data to be passed to the parse procedures. lil gift bag for the parse procs 🎁

πŸ¦‹ RETURN πŸ¦‹

Returns a new compound string πŸŽ‰. The function allocates space to hold the returned compound string. And listen, when your application no longer needs the returned compound string, the application should call XmStringFree. yes queen, free your memory, it's self care πŸ’†β€β™€οΈ



ok that's the whole page bestie, nothing skipped, nothing dropped, every flag and param accounted for πŸ’―

mwah πŸ’‹ this was XmStringParseText(library call) β€” straight outta the Xm library call section, and that footer line was all it gave us, no extra version or date tea. stay parsing, stay iconic πŸ‘‘βœ¨