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

✨ 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 is 0 (zero). yes bestie, we start counting at zero, that's just the rules πŸ”’
  • num_chars β€” Specifies the number of wchar_t characters to be copied into the provided buffer.
  • buffer_size β€” Specifies the size of the supplied buffer as a number of wchar_t storage locations. The minimum size is num_chars + 1. that + 1 is 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 of buffer are 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 between start and the end of the widget's buffer and terminated the string with a NULL terminator; fewer than num_chars characters were copied. so like… you got some of it, not all of it πŸ™ˆ

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 πŸ¦‹πŸ’