|
@@ 190-201 (lines=12) @@
|
| 187 |
|
* |
| 188 |
|
* @noinspection PhpDocSignatureInspection |
| 189 |
|
*/ |
| 190 |
|
public function append(string ...$suffix): self |
| 191 |
|
{ |
| 192 |
|
if (\count($suffix) <= 1) { |
| 193 |
|
/** @noinspection CallableParameterUseCaseInTypeContextInspection */ |
| 194 |
|
$suffix = $suffix[0]; |
| 195 |
|
} else { |
| 196 |
|
/** @noinspection CallableParameterUseCaseInTypeContextInspection */ |
| 197 |
|
$suffix = \implode('', $suffix); |
| 198 |
|
} |
| 199 |
|
|
| 200 |
|
return static::create($this->str . $suffix, $this->encoding); |
| 201 |
|
} |
| 202 |
|
|
| 203 |
|
/** |
| 204 |
|
* Append an password (limited to chars that are good readable). |
|
@@ 1677-1688 (lines=12) @@
|
| 1674 |
|
* |
| 1675 |
|
* @noinspection PhpDocSignatureInspection |
| 1676 |
|
*/ |
| 1677 |
|
public function prepend(string ...$prefix): self |
| 1678 |
|
{ |
| 1679 |
|
if (\count($prefix) <= 1) { |
| 1680 |
|
/** @noinspection CallableParameterUseCaseInTypeContextInspection */ |
| 1681 |
|
$prefix = $prefix[0]; |
| 1682 |
|
} else { |
| 1683 |
|
/** @noinspection CallableParameterUseCaseInTypeContextInspection */ |
| 1684 |
|
$prefix = \implode('', ...$prefix); |
| 1685 |
|
} |
| 1686 |
|
|
| 1687 |
|
return static::create($prefix . $this->str, $this->encoding); |
| 1688 |
|
} |
| 1689 |
|
|
| 1690 |
|
/** |
| 1691 |
|
* Replaces all occurrences of $pattern in $str by $replacement. |