Take Certain # characters from Left to Right

Hi, I’m trying to use string manipulation node to take 3 characters in 1 column from left to right with padRight(str, size). I’m using column name as str input and 3 as size.

For example:

APPLE become APP

But somehow the results when I’m using it is resulting in APPLE instead of APP.

Is there anything I did wrong or it’s not how I supposed to use the expression?

Thanks!

Hi @andersenyunan

Why don’t use String Mainpulation with substring: substr($column1$,0 ,3)

6 Likes

Thanks for the help! @HansS :slight_smile:

2 Likes

Hi there @andersenyunan,

pad function are for adding characters to an existing string and not for removing. To see how function works you can check description and examples within node.

SMExamples

Br,
Ivan

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.