Question
When I trim strings with trim logics such as Trim Left logic, it does not work as expected.
Please tell me the details and examples of using trim logics.
Answer
The following types of logic can be used to trim strings.
-Trim Left
https://www.hulft.com/help/en-us/HULFTSquare/Content/Designer/Mapper/TrimLeft.htm
-Trim Right
https://www.hulft.com/help/en-us/HULFTSquare/Content/Designer/Mapper/TrimRight.htm
-Trim Both Sides
https://www.hulft.com/help/en-us/HULFTSquare/Content/Designer/Mapper/Trim.htm
In these logics, values specified in [Other character to trim] are judged not as a string but as individual characters in random order.
For example, if "abc" is set in [Other character to trim], the logic trims "a", "b", and "c", not string "abc".
This process is repeated until a character other than "a," "b," or "c" is encountered.
<Examples of use>
Input string: xyabcz
Trim logics properties - Other character to trim: yxz
- When [Trim Left] is used:
(1) [Trim Left] logic checks the input string from the left side of it whether the characters match to [Other character to trim].
(2) "xy" is trimmed as a sequence of "y" and "x" set in [Other character to trim].
(3) The next "a" is not trimmed since "a" is not set in [Other character to trim].
(4) The remaining characters are not subject to the logic because "a" broke the sequence of characters set in [Other character to trim].
(5) As a result, the logic outputs "abcz".
In the same way, other trim logics output results as follows.
- When [Trim Right] is used:
Result: xyabc
- When [Trim Both Sides] is used:
Result: abc
Comments
0 comments
Article is closed for comments.