Function __global->cms_trim
Definitions
sources/symbols.php
- Trim some text, supporting removing HTML white-space also.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: string
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $text | string | No | No | required parameter | N/A | N/A | Input text |
| $try_hard | boolean | No | No | True | N/A | N/A | Whether to keep doing it, while it changes (if complex mixtures are on the end) |
Returns
- The result text
- Type: string
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Trim some text, supporting removing HTML white-space also.
*
* @param string $text Input text
* @param boolean $try_hard Whether to keep doing it, while it changes (if complex mixtures are on the end)
* @return string The result text
*/
function cms_trim(string $text, bool $try_hard = true) : string
* Trim some text, supporting removing HTML white-space also.
*
* @param string $text Input text
* @param boolean $try_hard Whether to keep doing it, while it changes (if complex mixtures are on the end)
* @return string The result text
*/
function cms_trim(string $text, bool $try_hard = true) : string

