php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
pcre2_substitute.c File Reference
#include "pcre2_internal.h"

Go to the source code of this file.

Macros

#define PTR_STACK_SIZE   20
 
#define SUBSTITUTE_OPTIONS
 
#define CHECKMEMCPY(from, length)
 

Functions

PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION pcre2_substitute (const pcre2_code *code, PCRE2_SPTR subject, PCRE2_SIZE length, PCRE2_SIZE start_offset, uint32_t options, pcre2_match_data *match_data, pcre2_match_context *mcontext, PCRE2_SPTR replacement, PCRE2_SIZE rlength, PCRE2_UCHAR *buffer, PCRE2_SIZE *blength)
 

Macro Definition Documentation

◆ CHECKMEMCPY

#define CHECKMEMCPY ( from,
length )
Value:
{ \
if (!overflowed && lengthleft < length) \
{ \
if ((suboptions & PCRE2_SUBSTITUTE_OVERFLOW_LENGTH) == 0) goto NOROOM; \
overflowed = TRUE; \
extra_needed = length - lengthleft; \
} \
else if (overflowed) \
{ \
extra_needed += length; \
} \
else \
{ \
memcpy(buffer + buff_offset, from, CU2BYTES(length)); \
buff_offset += length; \
lengthleft -= length; \
} \
}
#define TRUE
Definition gd_gd.c:7
foreach($dp as $el) foreach( $dp as $el) if( $pass2< 2) echo ""
#define PCRE2_SUBSTITUTE_OVERFLOW_LENGTH
Definition pcre2.h:188
#define CU2BYTES(x)
Definition file.h:177
else
Definition zend_ini.c:906

Definition at line 197 of file pcre2_substitute.c.

◆ PTR_STACK_SIZE

#define PTR_STACK_SIZE   20

Definition at line 48 of file pcre2_substitute.c.

◆ SUBSTITUTE_OPTIONS

#define SUBSTITUTE_OPTIONS
Value:
#define PCRE2_SUBSTITUTE_REPLACEMENT_ONLY
Definition pcre2.h:193
#define PCRE2_SUBSTITUTE_GLOBAL
Definition pcre2.h:184
#define PCRE2_SUBSTITUTE_EXTENDED
Definition pcre2.h:185
#define PCRE2_SUBSTITUTE_MATCHED
Definition pcre2.h:192
#define PCRE2_SUBSTITUTE_LITERAL
Definition pcre2.h:191
#define PCRE2_SUBSTITUTE_UNSET_EMPTY
Definition pcre2.h:186
#define PCRE2_SUBSTITUTE_UNKNOWN_UNSET
Definition pcre2.h:187

Definition at line 50 of file pcre2_substitute.c.

Function Documentation

◆ pcre2_substitute()

PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION pcre2_substitute ( const pcre2_code * code,
PCRE2_SPTR subject,
PCRE2_SIZE length,
PCRE2_SIZE start_offset,
uint32_t options,
pcre2_match_data * match_data,
pcre2_match_context * mcontext,
PCRE2_SPTR replacement,
PCRE2_SIZE rlength,
PCRE2_UCHAR * buffer,
PCRE2_SIZE * blength )

Definition at line 220 of file pcre2_substitute.c.