| @@ 605-611 (lines=7) @@ | ||
| 602 | * |
|
| 603 | * @return self |
|
| 604 | */ |
|
| 605 | public function trim(string $mask = null): self |
|
| 606 | { |
|
| 607 | return new self( |
|
| 608 | $mask === null ? trim((string) $this) : trim((string) $this, $mask), |
|
| 609 | $this->encoding |
|
| 610 | ); |
|
| 611 | } |
|
| 612 | ||
| 613 | /** |
|
| 614 | * Trim the right side of the string |
|
| @@ 620-626 (lines=7) @@ | ||
| 617 | * |
|
| 618 | * @return self |
|
| 619 | */ |
|
| 620 | public function rightTrim(string $mask = null): self |
|
| 621 | { |
|
| 622 | return new self( |
|
| 623 | $mask === null ? rtrim((string) $this) : rtrim((string) $this, $mask), |
|
| 624 | $this->encoding |
|
| 625 | ); |
|
| 626 | } |
|
| 627 | ||
| 628 | /** |
|
| 629 | * Trim the left side of the string |
|
| @@ 635-641 (lines=7) @@ | ||
| 632 | * |
|
| 633 | * @return self |
|
| 634 | */ |
|
| 635 | public function leftTrim(string $mask = null): self |
|
| 636 | { |
|
| 637 | return new self( |
|
| 638 | $mask === null ? ltrim((string) $this) : ltrim((string) $this, $mask), |
|
| 639 | $this->encoding |
|
| 640 | ); |
|
| 641 | } |
|
| 642 | ||
| 643 | /** |
|
| 644 | * Check if the given string is present in the current one |
|