| @@ 2633-2650 (lines=18) @@ | ||
| 2630 | * |
|
| 2631 | * @return static |
|
| 2632 | */ |
|
| 2633 | public function lineWrap( |
|
| 2634 | int $limit, |
|
| 2635 | string $break = "\n", |
|
| 2636 | bool $add_final_break = true, |
|
| 2637 | string $delimiter = null |
|
| 2638 | ): self { |
|
| 2639 | return static::create( |
|
| 2640 | $this->utf8::wordwrap_per_line( |
|
| 2641 | $this->str, |
|
| 2642 | $limit, |
|
| 2643 | $break, |
|
| 2644 | true, |
|
| 2645 | $add_final_break, |
|
| 2646 | $delimiter |
|
| 2647 | ), |
|
| 2648 | $this->encoding |
|
| 2649 | ); |
|
| 2650 | } |
|
| 2651 | ||
| 2652 | /** |
|
| 2653 | * Line-Wrap the string after $limit, but also after the next word. |
|
| @@ 2672-2689 (lines=18) @@ | ||
| 2669 | * |
|
| 2670 | * @return static |
|
| 2671 | */ |
|
| 2672 | public function lineWrapAfterWord( |
|
| 2673 | int $limit, |
|
| 2674 | string $break = "\n", |
|
| 2675 | bool $add_final_break = true, |
|
| 2676 | string $delimiter = null |
|
| 2677 | ): self { |
|
| 2678 | return static::create( |
|
| 2679 | $this->utf8::wordwrap_per_line( |
|
| 2680 | $this->str, |
|
| 2681 | $limit, |
|
| 2682 | $break, |
|
| 2683 | false, |
|
| 2684 | $add_final_break, |
|
| 2685 | $delimiter |
|
| 2686 | ), |
|
| 2687 | $this->encoding |
|
| 2688 | ); |
|
| 2689 | } |
|
| 2690 | ||
| 2691 | /** |
|
| 2692 | * Splits on newlines and carriage returns, returning an array of Stringy |
|