TRUNCATE
The TRUNCATE function truncates a string.
Input/Output
Number of Connections: Min: 1/Max:2
| Input | Data Type | Description |
| Input1 | String | The string to truncate. |
| Input2 | Integer | Sets the Length property. (optional) |
| Output | Data Type | Description |
| Output1 | String | The truncated string. |
Property
| Name | Property Type | Description |
| StartFrom | choice |
Specifies the direction from which truncation is to be performed.
| Left [true]
| - |
truncate the left portion of the string
|
| Right [false]
| - |
truncate the right portion of the string
|
|
| Length | int |
Specifies the number of characters to be truncated.
|
| Mode | choice |
Specifies how to count the length.
| String | - |
Count by the number of characters.
|
| Binary | - |
Count by the number of bytes.
|
|
| Encoding | choice | Specifies encoding when counting by bytes. |
Topic
- Setting Length to a value less than one will result in an error.
Examples
| Property | Output |
| Input1 | Infoteria | StartFrom | Left | teria |
| | Length | 4 | |
| | Mode | String | |
| Property | Output |
| Input1 | Infoteria | StartFrom | Right | Info |
| | Length | 5 | |
| | Mode | String | |