| @@ 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 | $suffix = $suffix[0]; |
|
| 262 | } else { |
|
| 263 | $suffix = \implode('', $suffix); |
|
| 264 | } |
|
| 265 | ||
| 266 | return static::create($this->str . $suffix, $this->encoding); |
|
| 267 | } |
|
| 268 | ||
| 269 | /** |
|
| 270 | * Append an password (limited to chars that are good readable). |
|
| 271 | * |
|
| 272 | * EXAMPLE: <code> |
|
| @@ 3185-3196 (lines=12) @@ | ||
| 3182 | * @return static |
|
| 3183 | * <p>Object with appended $prefix.</p> |
|
| 3184 | */ |
|
| 3185 | public function prepend(string ...$prefix): self |
|
| 3186 | { |
|
| 3187 | if (\count($prefix) <= 1) { |
|
| 3188 | $prefix = $prefix[0]; |
|
| 3189 | } else { |
|
| 3190 | $prefix = \implode('', $prefix); |
|
| 3191 | } |
|
| 3192 | ||
| 3193 | return static::create($prefix . $this->str, $this->encoding); |
|
| 3194 | } |
|
| 3195 | ||
| 3196 | /** |
|
| 3197 | * Returns a new string starting with $prefix. |
|
| 3198 | * |
|
| 3199 | * EXAMPLE: <code> |
|