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 pcre2api page πŸ“–
  • and a description of the POSIX API lives in the pcre2posix page πŸ“–

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