syntax
SUBSTR(text,position,-length,length_mode)
example
text="abcdefgh"
SUBSTR(text,1,-2) => "abcdef"
result
This would fetch a part from a string that is a little less than the original string.
The suggestion would be a shortcut (and hopefully one with a higher performance) to
SUBSTR(text, 1, LENGTH(text)-2))
reason
The advantage is that this eliminates the need to write "text" - which could be a complex expression - twice.
We already can select a few characters from the end of the string using a negative position.
SUBSTR(text,-2) => "gh"
returns the last two chars from a text. However currently there is no quick way to fetch the first part.
The suggestion would complete this.
-- Edit --
added 4th parameter length_mode: needed so that existing code still produces NULL for negative lengths. See further comments in this thread.