XMTEXTGETSUBSTRINGWCS(3)
β¨ XmTextGetSubstringWcs β¨
okay bestie, welcome to the library call corner of the man pages π this one is XmTextGetSubstringWcs, and it lives in the library call section, so you already know it's a real one. It's a Text function that snags a lil slice of a wide character internal text buffer π
πΈ NAME πΈ
XmTextGetSubstringWcs β A Text function that retrieves a portion of a wide character internal text buffer
no cap, that's literally the whole job description π
β¨ SYNOPSIS β¨
#include <Xm/Text.h>
int XmTextGetSubstringWcs(
Widget widget,
XmTextPosition start,
int num_chars,
int buffer_size,
wchar_t *buffer);
π¦ DESCRIPTION π¦
okay so here's the vibe: XmTextGetSubstringWcs retrieves a copy of a portion of the internal text buffer of a Text widget that is stored in a wide character format. The function copies a specified number of characters from a given start position in the internal text buffer into a buffer provided by the application. A NULL terminator is placed at the end of the copied data. periodt, that's the whole thing π«
widgetβ Specifies the Text widget ID. it's giving "which widget are we even talking about" energy π«Άstartβ Specifies the beginning character position from which the data will be retrieved. This is an integer number of characters from the beginning of the text buffer. The first character position is0(zero). yes bestie, we start counting at zero, that's just the rules π’num_charsβ Specifies the number ofwchar_tcharacters to be copied into the provided buffer.buffer_sizeβ Specifies the size of the supplied buffer as a number ofwchar_tstorage locations. The minimum size isnum_chars + 1. that+ 1is not optional, it's the NULL terminator's whole seat at the table πbufferβ Specifies the wide character buffer into which the internal text buffer will be copied.
For a complete definition of Text and its associated resources, see XmText(3). go read it, it's giving main character energy π
π RETURN π
XmCOPY_SUCCEEDEDβ The function was successful. slay β¨ we ate, no crumbs.XmCOPY_FAILEDβ The function failed because it was unable to copy the specified number of characters into the buffer provided. The buffer size may be insufficient. The contents ofbufferare undefined. not the undefined contents π please do not read from that buffer like it's fine, because it is NOT fine.XmCOPY_TRUNCATEDβ The requested number of characters extended beyond the internal buffer. The function copied characters betweenstartand the end of the widget's buffer and terminated the string with aNULLterminator; fewer thannum_charscharacters were copied. so likeβ¦ you got some of it, not all of it π
π RELATED π
XmText(3) and XmTextGetSubstring(3). the girlies that come as a set π
and that's the whole page, bestie! this was XmTextGetSubstringWcs(library call) β yes, the same title twice, once up top and once at the bottom, that's just how these pages do it π k bye, go copy some wide characters responsibly π¦π
π¦ 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