feature request: new function in string manipulation

Hello,

Do you think you could implement a substr(str, start, end) function in the string manipulation node?

This would be very useful when you already know the substring indexes. I know a workaround is to calculate the lenght of the wanted substring, but this would be so much intuitive. 

Thank you

Nicolas

Hi Nicolas!

The problem with a substr(str, start, end) function would be that it conflicts with substr(str, start, length). Take the following two lines for example:

substr("This is a string", 2, 10)
substr("This is a string", 2, 4)

One cannot decide on whether I meant to use substr(str, start, end) or substr(str, start, length). A workaround would be to name the function differently, but in this case I would prefer the solution you already mentioned:

substr(str, start, end-start)

Which results in the substring from start to end (the character at end index is not included).

I hope that works for you.
Jonathan