Strip whitespace (or other characters) from the beginning and end of a string, using PHP's trim function.
- Service:
CleverAge\ProcessBundle\Transformer\String\TrimTransformer - Transformer code:
trim
Any value that can be cast to string, or null.
string: the trimmed valuenullif the input isnull
| Code | Type | Required | Default | Description |
|---|---|---|---|---|
charlist |
string |
" \t\n\r\0\x0B" |
Characters to strip (ranges like a..z are supported) |
' trim me 'becomes'trim me'
# Transformer options level
trim: ~'-trim me-'becomes'trim me'
# Transformer options level
trim:
charlist: '-'