Category: Text function
This function returns text excluding the last length characters, including spaces and non-printing characters.
Argument | Type | Description |
---|---|---|
text | Text | Any text value from which the trailing length characters are removed. |
length | Number (Greater than 0) | The number of characters to remove from the end of text. |
Return value type: Text
Number values entered for text are implicitly converted to text.
Blank spaces and non-printing characters are counted as characters and removed.
To ensure hidden, non-printing characters are not throwing off results, use the Sanitize function on text first.
removeend('1000 USD', 4) //Returns '1000'
removeend('October 1, 2014', 6) //Returns 'October 1'
removeend(100200, 3) //Returns '100' (Number implicitly converted to text; value is returned as text)
removeend('North' & char(10) & 'South', 7) //Returns 'Nort' (the line break - char(10) - counts as a character)