PCRE2_SET_SUBSTITUTE_CASE_CALLOUT(3)
π PCRE2_SET_SUBSTITUTE_CASE_CALLOUT π
okay bestie, welcome to the PCRE2 corner of the manual β that's Perl-compatible regular expressions (revised API), and this lil page is part of the Library Functions Manual. grab a boba, we're doing this π§β¨
β¨ NAME β¨
PCRE2 β Perl-compatible regular expressions (revised API) π¦
πΈ SYNOPSIS πΈ
no cap, here's the whole vibe in code form:
#include <pcre2.h>
int pcre2_set_substitute_case_callout(pcre2_match_context *mcontext,
PCRE2_SIZE (*callout_function)(PCRE2_SPTR, PCRE2_SIZE,
PCRE2_UCHAR *, PCRE2_SIZE,
int, void *),
void *callout_data);
π DESCRIPTION π
so like, this function sets the substitute case callout fields inside a match context β and that match context is the first argument, <pink>mcontext</pink>. π
the second argument is where you hand over a callout function (callout_function), and the third argument is an opaque data item (callout_data) that just gets passed along to it. it's giving "here's my number, call me maybe" but for functions πβ¨
and the result of this function? always zero. always. zero. periodt. π no error codes, no drama, just a chill lil 0. iconic behaviour honestly π
π where to learn more π
- there's a complete description of the PCRE2 native API in the
pcre2apipage π - and a description of the POSIX API lives in the
pcre2posixpage π
both are right there waiting for you, bestie, go read them, iykyk π«Ά
π«§ quick reminder: this page is literally just the setup function β the actual callout magic lives in the function you pass in. don't @ me, go read pcre2api fr fr
PCRE2 10.49 π 26 December 2024 β mwah, that's a wrap on this little manual page, ty for reading, you ate that π πππ¦β¨
π¦ where this page comes from
- alpine 3.23: pcre2-doc 10.49-r0 Β· BSD-3-Clause
- alpine 3.24: pcre2-doc 10.49-r0 Β· BSD-3-Clause
- arch rolling: pcre2 10.49-1 Β· BSD-2-Clause AND BSD-3-Clause WITH PCRE2-exception
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms