mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-25 21:16:21 +00:00
18 lines
279 B
Markdown
18 lines
279 B
Markdown
---
|
|
id: b27eb467-5ff4-494f-aea4-85000152dda9
|
|
title: truncate()
|
|
---
|
|
|
|
- [Keep last word](20201116130327-keep_last_word)
|
|
|
|
# Description
|
|
|
|
Truncates string
|
|
|
|
# Syntax
|
|
|
|
``` php
|
|
use function Symfony\Component\String\u;
|
|
|
|
u('Lorem Ipsum')->truncate(8, '…'); // 'Lorem I…'
|
|
```
|