XMSTRINGPARSETEXT(3)
πΈ 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
typeisXmCHARSET_TEXT, then the associated tag is interpreted as a charset name. And iftaghas a value ofNULL? Then a charset component gets created whose value is the result of mappingXmFONTLIST_DEFAULT_TAG. periodt β¨ - If
typeisXmMULTIBYTE_TEXTorXmWIDECHAR_TEXT, then the associated tag is interpreted as a language environment name. Iftaghas a value ofNULL, a locale component gets created with a value of_MOTIF_DEFAULT_LOCALE. And heads up bestie, iftypeisXmMULTIBYTE_TEXTorXmWIDECHAR_TEXT, thentagmust beNULLor_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 theNULL-terminated string containing characters of a type determined bytype. This is updated to point to after the last character scanned. she moves on, she doesn't look back πtext_endβ Specifies a pointer intotext. If aNULLis supplied to thetext_endparameter, thenXmStringParseTextparsestextuntilNULLis encountered, or until it reaches a point intextwhere it is directed to stop (for example, by aparse_proc). Otherwise, the value supplied to thetext_endparameter is the pointer intotextwhere 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 thetagvalue isNULLand iftypeindicates that a charset string tag should be created, the string tag has the value that is the result of mappingXmFONTLIST_DEFAULT_TAG. Iftypeindicates 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,typehas a value of eitherXmMULTIBYTE_TEXTorXmWIDECHAR_TEXT. Iftypehas value ofXmCHARSET_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 inparse_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 πββοΈ
π RELATED π
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 πβ¨
π¦ where this page comes from
- alpine 3.24: motif-doc 2.5.2-r0 Β· LGPL-2.1-or-later
- arch rolling: openmotif 2.3.8-4 Β· LGPL-2.1-or-later
- centos-stream 9: motif-devel 2.3.4-32.el9 Β· LGPLv2+
- centos-stream 9: motif-devel 2.3.4-32.el9 Β· LGPLv2+
- epel 10: motif-devel 2.3.8-2.el10_2 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-1.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-1.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-2.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-2.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 44: motif-devel 2.3.8-3.fc44 Β· LicenseRef-Callaway-LGPLv2+
- fedora 44: motif-devel 2.3.8-3.fc44 Β· LicenseRef-Callaway-LGPLv2+
- nixos 26.05: motif 2.3.8
- nixpkgs unstable: motif 2.3.8
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms