User Tools

Site Tools


syntax:functions:removeend

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
syntax:functions:removeend [2015/03/27 14:15] elenapsyntax:functions:removeend [2021/08/15 02:26] craigt
Line 1: Line 1:
-====== RemoveEnd(text, N) ======+======RemoveEnd(text, length) ====== 
 +Category:  Text function
  
-Returns the //'text'// without the last //N// characters including spaces. Parameter //N// must be greater than 0.+\\  
 +=====Description===== 
 +This function returns //text// excluding the last //length// charactersincluding spaces and non-printing characters.
  
-Note that the expression does not require to use apostrophe signs ('X'around the number //N//.+\\  
 +=====Arguments===== 
 +^Argument^Type^Description^ 
 +|text|Text|Any text value from which the trailing characters are removed.| 
 +|length|Number (Greater than 0)|The number of characters to remove from the end of //text//.|
  
-^  Example  ^  Result +**Return value type:** Text
-|  RemoveEnd( '1000 USD', 4 )  |  1000  | +
-|  removeend('October 1, 2014', 6)  |  October 1  |+
  
-=== See also === +\\  
-  * [[syntax:functions:keepbefore]] +=====Remarks===== 
-  * [[syntax:functions:removestart]]+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 '200' (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, string)]] 
 +  * [[syntax:functions:removestart|RemoveStart(text, N)]]
syntax/functions/removeend.txt · Last modified: 2021/08/15 02:52 by craigt

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki