| @@ 1826-1836 (lines=11) @@ | ||
| 1823 | ), |
|
| 1824 | $trimChars |
|
| 1825 | ); |
|
| 1826 | } else { |
|
| 1827 | $extract = $ellipsis . trim( |
|
| 1828 | UTF8::substr( |
|
| 1829 | $text, |
|
| 1830 | $pos_start, |
|
| 1831 | $pos_end, |
|
| 1832 | $this->encoding |
|
| 1833 | ), |
|
| 1834 | $trimChars |
|
| 1835 | ) . $ellipsis; |
|
| 1836 | } |
|
| 1837 | ||
| 1838 | } else { |
|
| 1839 | ||
| @@ 1852-1859 (lines=8) @@ | ||
| 1849 | UTF8::strpos($text, '.', $l, $this->encoding) |
|
| 1850 | ); |
|
| 1851 | ||
| 1852 | if ($pos_end) { |
|
| 1853 | $extract = rtrim( |
|
| 1854 | UTF8::substr($text, 0, $pos_end, $this->encoding), |
|
| 1855 | $trimChars |
|
| 1856 | ) . $ellipsis; |
|
| 1857 | } else { |
|
| 1858 | $extract = $text; |
|
| 1859 | } |
|
| 1860 | } |
|
| 1861 | ||
| 1862 | return static::create($extract, $this->encoding); |
|