Hello everyone,
I’m trying to trim a string for example:
‘10557 Main Avenue Suite 2904’
to… for lets say 15 chars
‘10557 Main Aven’
I’m currently using the following:
PADSTR(‘10557 Main Avenue Suite 2904’, 15);
The problem with this is that if the original string is lets say 10 characters, the resulting string is:
'10557 Main ’ with a 5 spaces added after Main totaling 15 characters
Then I have to use the DELCHR function to remove the trailing spaces:
DELCHR(PADSTR(‘10557 Main’, 15), ‘>’, ’ ');
I couldn’t find a function that trims in one operation
Is there a better way to do it?
Thanks in advance !