Trim
Strip whitespace (or other characters) from the beginning and/or end of a string.
$etl->transform('trim', $options);
Options
Columns
Columns that will be transformed. If empty
, the transformation is applied to all columns.
Type
Default value
array
[]
$options = ['columns' => ['name', 'email']];
Type
The options trim
| all
| both
will trim both sides, ltrim
| start
| left
will trim the left side and rtrim
| end
| right
will trim the right side of the string.
Type
Default value
string
both
$options = ['type' => 'right'];
Mask
The stripped characters. Simply list all characters that you want to be stripped. With .. you can specify a range of characters.
Type
Default value
string
" \t\n\r\0\x0B"
$options = ['mask' => '|'];
Last updated