Function __global->trim

Definitions

sources_custom/phpstub.php

  • Strip whitespace from both ends of a string.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: string

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$str string No No required parameter N/A N/A String to trim from
$characters string No No N/A N/A Characters to trim

Returns

  • Trimmed string
  • Type: string
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Strip whitespace from both ends of a string.
 *
 * @param  string $str String to trim from
 * @param  string $characters Characters to trim
 * @return string Trimmed string
 */

function trim(string $str, string $characters = '      

'
) : string