PCRE2_SUBSTRING_FREE(3)
πΈ NAME πΈ
PCRE2 β literally Perl-compatible regular expressions, but make it the revised API β¨ (yes bestie, the glow-up edition π )
π SYNOPSIS π
#include <pcre2.h>
void pcre2_substring_free(PCRE2_UCHAR *buffer);
π¦ DESCRIPTION π¦
okay so picture this: you've got a string, right? and it came from a previous call to pcre2_substring_get_byname() or pcre2_substring_get_bynumber(). that memory is yours, but likeβ¦ it's not gonna free itself, bestie π. enter pcre2_substring_free() β the convenience function of your dreams π. it exists purely to free that memory for you. one job. does it slay? yes.
her only argument is a pointer to the string β that's it, that's the whole vibe π«Ά.
and here's the iconic part: if the argument is NULL, the function does nothing. no crash, no drama, no main character meltdown π. it just peacefully minds its business. we love a low-maintenance function β¨.
there's a complete description of the PCRE2 native API hanging out in the pcre2api page, and if you're feeling the POSIX API instead, the pcre2posix page has you covered π. go read them, iykyk π
ngl, the one thing to remember: this is for strings that came frompcre2_substring_get_byname()orpcre2_substring_get_bynumber(). don't be out here freeing random pointers, that's not the vibe π.
and that's the whole page, bestie β short, sweet, and absolutely ate π πΈ π¦ π
β signed, sealed, delivered by PCRE2 10.47, dated 26 February 2025 β β see you in the next manpage, mwah ππ
π¦ where this page comes from
- fedora 43: pcre2-devel 10.47-1.fc43 Β· BSD-3-Clause AND FSFULLR AND X11 AND GPL-2.0-or-later AND FSFAP AND FSFUL AND GPL-3.0-or-later
- fedora 43: pcre2-devel 10.47-1.fc43 Β· BSD-3-Clause AND FSFULLR AND X11 AND GPL-2.0-or-later AND FSFAP AND FSFUL AND GPL-3.0-or-later
- fedora 44: pcre2-devel 10.47-1.fc44.1 Β· BSD-3-Clause AND FSFULLR AND X11 AND GPL-2.0-or-later AND FSFAP AND FSFUL AND GPL-3.0-or-later
- fedora 44: pcre2-devel 10.47-1.fc44.1 Β· BSD-3-Clause AND FSFULLR AND X11 AND GPL-2.0-or-later AND FSFAP AND FSFUL AND GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms