RIGHTB
The RIGHTB function outputs the last (right) N bytes specified by the Count property.
Input/Output
Number of Connections: Min: 1/Max:2
| Input | Data Type | Description |
| Input1 | Binary | The data. |
| Input2 | Integer | Sets the Count property. (optional) |
| Output | Data Type | Description |
| Output1 | Binary | The selected data. |
Property
| Name | Property Type | Description |
| Count | int | Specifies the number of bytes to select from the end of the input data.
Return the byte array with size 0, if Count is set to 0.
Return whole data, if Count is bigger than the input data's length.
|
Topic
- A negative number entered in the
Count property will result in an error. The mapper component that this function is in will abort and throw an exception.
How a Binary function handles byte conversions
The Binary Functions LEFTB, RIGHTB, MIDB, REPLACEB and TRUNCATEB handle input binary data as it is. If binary data cannot be successfully converted back to a string, an empty string is output.
Example
| Property | Output |
| Input1 | 0x6165696F75 | Count | 2 | 0x6F75 |