======RemoveEnd(text, length) ======
Category:  Text function

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

\\ 
=====Arguments=====
^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

\\ 
=====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 [[syntax:functions:sanitize|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:remove|Remove(text, start, length)]]
  * [[syntax:functions:removechars|RemoveChars(text, chars)]]
  * [[syntax:functions:removestart|RemoveStart(text, length)]]
  * [[syntax:functions:removetext|RemoveText(text, string)]]