@@ 233-244 (lines=12) @@ | ||
230 | * |
|
231 | * @noinspection PhpDocSignatureInspection |
|
232 | */ |
|
233 | public function append(string ...$suffix): self |
|
234 | { |
|
235 | if (\count($suffix) <= 1) { |
|
236 | /** @noinspection CallableParameterUseCaseInTypeContextInspection */ |
|
237 | $suffix = $suffix[0]; |
|
238 | } else { |
|
239 | /** @noinspection CallableParameterUseCaseInTypeContextInspection */ |
|
240 | $suffix = \implode('', $suffix); |
|
241 | } |
|
242 | ||
243 | return static::create($this->str . $suffix, $this->encoding); |
|
244 | } |
|
245 | ||
246 | /** |
|
247 | * Append an password (limited to chars that are good readable). |
|
@@ 2615-2626 (lines=12) @@ | ||
2612 | * |
|
2613 | * @noinspection PhpDocSignatureInspection |
|
2614 | */ |
|
2615 | public function prepend(string ...$prefix): self |
|
2616 | { |
|
2617 | if (\count($prefix) <= 1) { |
|
2618 | /** @noinspection CallableParameterUseCaseInTypeContextInspection */ |
|
2619 | $prefix = $prefix[0]; |
|
2620 | } else { |
|
2621 | /** @noinspection CallableParameterUseCaseInTypeContextInspection */ |
|
2622 | $prefix = \implode('', $prefix); |
|
2623 | } |
|
2624 | ||
2625 | return static::create($prefix . $this->str, $this->encoding); |
|
2626 | } |
|
2627 | ||
2628 | /** |
|
2629 | * Returns a new string starting with $prefix. |