User Tools

Site Tools


syntax:functions:removeend

RemoveEnd(text, length)

Category: Text function


Description

This function returns text excluding the last length characters, including spaces and non-printing characters.


Arguments

ArgumentTypeDescription
textTextAny text value from which the trailing length characters are removed.
lengthNumber (Greater than 0)The number of characters to remove from the end of text.

Return value type: Text


Remarks

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.


Examples

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)


See also

syntax/functions/removeend.txt · Last modified: 2021/08/15 02:52 by craigt

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki