cancel
Showing results for 
Search instead for 
Did you mean: 
marcpaige
Astronaut
Status: New

Additional string functions:

left(string,int) to return the left x characters of a string.
right(string,int) to return the right x characters of a string.

4 Comments
marcpaige
Astronaut

btw, Substring() is not the same.

JoeM
Community Manager
Community Manager

Hi @marcpaige  - are you saying that the behavior has changed for substring()?

marcpaige
Astronaut

Hi @JoeM,

No, I am saying this is basic string functionality that has never been in the built-in functions.

substring(string, int, int) can be similar to right(string, int) but you have to know the length of the overall string and then know the proper starting position. 

substring(string, length(string) - x, x) is the same as right(string, int).

substring(string, 0, int) is the same as left(string, int), so I could live that that but you have to remember that strings are 0 indexed.

JoeM
Community Manager
Community Manager

Got it! Yes - always nice to have a cleaner formula (especially if logic gets complex). I'll let @awarrier  comment on this idea from a product perspective.