preg_replace
thermage/thermage
Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Perform a regular expression search and replace
preg_replace
(
string
|array
$pattern
,
string
|array
$replacement
,
string
|array
$subject
,
int $limit
= -
1
,
int
&
$count
=
null
):
string
|array|
null
for (
$i
=
0
;
$i
<
$charsCount
;
$i
++) {
if (
$i
==
0
) {
$result
.=
preg_replace
(
$colorsTags
,
$colorsValues
,
$this
->
styles
->
get
(
'font.buffer.'
.
$j
));
}
$result
.=
preg_replace
(
$colorsTags
,
$colorsValues
,
$chars
[
$i
][
$j
]) .
src/Base/Element.php
$result
.=
preg_replace
(
$colorsTags
,
$colorsValues
,
$this
->
styles
->
get
(
'font.buffer.'
.
$j
));
}
$result
.=
preg_replace
(
$colorsTags
,
$colorsValues
,
$chars
[
$i
][
$j
]) .
strings
(
preg_replace
(
$colorsTags
,
$colorsValues
,
$this
->
styles
->
get
(
'font.letterspace.'
.
$j
)))->
repeat
((
$letterSpacing
>
1
) ?
$letterSpacing
:
1
);
if (
$i
==
$charsCount
-
1
) {
src/Base/Element.php
}
$result
.=
preg_replace
(
$colorsTags
,
$colorsValues
,
$chars
[
$i
][
$j
]) .
strings
(
preg_replace
(
$colorsTags
,
$colorsValues
,
$this
->
styles
->
get
(
'font.letterspace.'
.
$j
)))->
repeat
((
$letterSpacing
>
1
) ?
$letterSpacing
:
1
);
if (
$i
==
$charsCount
-
1
) {
$result
.=
preg_replace
(
$colorsTags
,
$colorsValues
,
$this
->
styles
->
get
(
'font.buffer.'
.
$j
));
src/Base/Element.php
strings
(
preg_replace
(
$colorsTags
,
$colorsValues
,
$this
->
styles
->
get
(
'font.letterspace.'
.
$j
)))->
repeat
((
$letterSpacing
>
1
) ?
$letterSpacing
:
1
);
if (
$i
==
$charsCount
-
1
) {
$result
.=
preg_replace
(
$colorsTags
,
$colorsValues
,
$this
->
styles
->
get
(
'font.buffer.'
.
$j
));
}
}
if (
$j
+
1
<
$linesCount
) {
src/Base/Element.php
public function
stripStyles
(
string $value
):
string
{
return
preg_replace
(
"/"
.
terminal
()->
getEsc
() .
"\[[^m]*m/"
,
''
,
$value
);
}
src/Base/Element.php