SDL_wcsstr(3)
β¨ SDL_wcsstr β¨
okay bestie, welcome to the SDL3 FUNCTIONS corner of the man pages π today we're looking at SDL_wcsstr, and honestly? it's giving "find my ex's name in the group chat" energy. let's go π¦
πΈ NAME πΈ
SDL_wcsstr β search a wide string for the first instance of a specific substring. no cap, that's literally the whole job π
β¨ SYNOPSIS β¨
#include <SDL3/SDL_stdinc.h>
wchar_t * SDL_wcsstr(const wchar_t *haystack, const wchar_t *needle);
π DESCRIPTION π
so here's the vibe: the search ends once it finds the requested substring, or a null terminator byte that ends the string. whichever comes first, bestie, and then it's done π
important note β this looks for strings of _wide characters_, not _codepoints_. so it is legal to search for malformed and incomplete UTF-16 sequences. yes fr fr, no judgement, it'll do it π
π«Ά FUNCTION PARAMETERS π«Ά
haystackβ the wide string to search. Must not beNULL. like, genuinely, don't. πneedleβ the wide string to search for. Must not beNULL. same deal, bestie, we're not doing that π
π RETURN VALUE π
returns a pointer to the first instance of needle in the string, or NULL if not found. that's it, that's the whole tea β
π THREAD SAFETY π
it is safe to call this function from any thread. main character energy across the board, she's not picky π
β AVAILABILITY β
this function is available since SDL 3.2.0. so if you're on anything older, sorry babe, no SDL_wcsstr for you π
and that's the whole page, bestie!! you ate this one, honestly π
this little love letter comes to you from Simple Directmedia Layer, SDL 3.4.18, straight out of the SDL_wcsstr(3) manual. mwah π
β¨π¦
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms