WireTextTools::trim()

Strip whitespace (or other characters) from the beginning and end of a string

Usage

// basic usage
$string = $wireTextTools->trim(string $str);

// usage with all arguments
$string = $wireTextTools->trim(string $str, string $chars = '');

Arguments

NameType(s)Description
$strstring
$chars (optional)string

Omit for default

Return value

string


WireTextTools methods and properties

API reference based on ProcessWire core version 3.0.251