@@ 258-269 (lines=12) @@ | ||
255 | * @return static |
|
256 | * <p>Object with appended $suffix.</p> |
|
257 | */ |
|
258 | public function append(string ...$suffix): self |
|
259 | { |
|
260 | if (\count($suffix) <= 1) { |
|
261 | /** @noinspection CallableParameterUseCaseInTypeContextInspection */ |
|
262 | $suffix = $suffix[0]; |
|
263 | } else { |
|
264 | /** @noinspection CallableParameterUseCaseInTypeContextInspection */ |
|
265 | $suffix = \implode('', $suffix); |
|
266 | } |
|
267 | ||
268 | return static::create($this->str . $suffix, $this->encoding); |
|
269 | } |
|
270 | ||
271 | /** |
|
272 | * Append an password (limited to chars that are good readable). |
|
@@ 3189-3200 (lines=12) @@ | ||
3186 | * @return static |
|
3187 | * <p>Object with appended $prefix.</p> |
|
3188 | */ |
|
3189 | public function prepend(string ...$prefix): self |
|
3190 | { |
|
3191 | if (\count($prefix) <= 1) { |
|
3192 | /** @noinspection CallableParameterUseCaseInTypeContextInspection */ |
|
3193 | $prefix = $prefix[0]; |
|
3194 | } else { |
|
3195 | /** @noinspection CallableParameterUseCaseInTypeContextInspection */ |
|
3196 | $prefix = \implode('', $prefix); |
|
3197 | } |
|
3198 | ||
3199 | return static::create($prefix . $this->str, $this->encoding); |
|
3200 | } |
|
3201 | ||
3202 | /** |
|
3203 | * Returns a new string starting with $prefix. |