[ Usenet FAQs | Search | Web FAQs | Documents | RFC Index ]
Part1 - Part2 - Part3 - Part4 - Part5 - Part6 - Part7 - Part8 - Part9 - Single Page
Top Document: Motif FAQ (Part 6 of 9)
Previous Document: 213) What string functions differ in Motif 1.1 and 1.2? Is
Next Document: 215) When can XmStrings used as resources be freed?
-
Search the FAQ Archives
Part1 - Part2 - Part3 - Part4 - Part5 - Part6 - Part7 - Part8 - Part9 - Single Page
Top Document: Motif FAQ (Part 6 of 9)
Previous Document: 213) What string functions differ in Motif 1.1 and 1.2? Is
Next Document: 215) When can XmStrings used as resources be freed?
214)* How can I get the ASCII text out of an XmString?
[Last modified: Feb 02]
Answer: In Motif 1.x, use XmStringGetLtoR:
char *str;
XmString xmstr;
XmStringGetLtoR(xmstr, XmSTRING_DEFAULT_CHARSET, &str);
In Motif 2.x, use XmStringUnparse:
str = XmStringUnparse(xmstr, NULL, 0, XmCHARSET_TEXT, NULL, 0, NULL);
In both cases, you should free the string to avoid a memory leak:
XtFree(str);
Top Document: Motif FAQ (Part 6 of 9)
Previous Document: 213) What string functions differ in Motif 1.1 and 1.2? Is
Next Document: 215) When can XmStrings used as resources be freed?
Part1 - Part2 - Part3 - Part4 - Part5 - Part6 - Part7 - Part8 - Part9 - Single Page
[ Usenet FAQs | Search | Web FAQs | Documents | RFC Index ]
Send corrections/additions to the FAQ Maintainer:
kenton@rahul.net (Ken Lee)
Last Update July 24 2008 @ 00:14 AM