Skip to content

Commit dafe5b3

Browse files
author
xmarchegay
committed
#145 add TrimTransformer documentation
1 parent c2b0778 commit dafe5b3

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed

docs/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
- [ImplodeTransformer]
124124
- [SlugifyTransformer]
125125
- [SprintfTransformer]
126-
- [TrimTransformer]
126+
- [TrimTransformer](reference/transformers/trim_transformer.md)
127127
- XML
128128
- [XpathEvaluatorTransformer](reference/transformers/xpath_evaluator.md)
129129
- Other bridges
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
TrimTransformer
2+
=========================
3+
4+
Strip whitespace (or other characters) from the beginning and end of a string
5+
6+
This transformer uses the php internal function: https://www.php.net/manual/en/function.trim.php
7+
8+
Task reference
9+
--------------
10+
11+
* **Service**: `CleverAge\ProcessBundle\Transformer\String\TrimTransformer`
12+
* **Transformer code**: `trim`
13+
14+
Accepted inputs
15+
---------------
16+
17+
Any value that can be cast to string and null.
18+
19+
Possible outputs
20+
----------------
21+
22+
Depending on the input :
23+
- `null` if the input is null
24+
- `string` if the input is not null
25+
26+
Options
27+
-------
28+
29+
| Code | Type | Required | Default | Description |
30+
| ---- | ---- | :------: |-----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------|
31+
| `charlist` | `string` | | ***" \t\n\r\0\x0B"*** | List of characters to trim |
32+

0 commit comments

Comments
 (0)