User Tools

Site Tools


syntax:functions:remove

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
syntax:functions:remove [2021/07/21 16:18] – [Examples] craigtsyntax:functions:remove [2021/07/21 16:22] craigt
Line 1: Line 1:
-====== Remove(text, start_posno_of_chars) =====+===== Remove(text, NK) =====
-Category:  Text function+
  
-\\  +Removes //K// characters from the //text//, starting with the //N//-th characterwhere //N// and //K// are numbers.
-=====Description===== +
-This function removes a specified number of charactersfrom a specified starting pointwithin a text string.+
  
-**Return value type:**  Text +First argument is implicitly converted into text, if required.
-\\  +
-=====Arguments===== +
-^Argument ^Type ^Description^ +
-|text |Text|Any text string or value that can implicitly be converted to text.+
-|start_pos |Integer greater than 0|The N<sup>th</sup> position of the first character in //text// to start removing from.  The minimum value is 1.| +
-|no_of_chars |Integer greater than 0 |The number of characters to remove.| +
-\\ +
  
-=====Remarks===== +^  Example  ^  Result  ^ 
-All three arguments must be supplied or a warning applies in each row of the column.+|  remove('27.03.2015', 6, 5 )    27.03  | 
 +|  remove('27.03.2015', 7, 2 )  |  27.03.15  |
  
-If //start_pos// is a position past the end of the text, nothing is removed.+**See also** 
 +  * [[syntax:functions:mid]]
  
-If //no_of_chars// exceeds the number of characters that can be removed, all characters from //start_pos// to the end of //text// will be removed. 
- 
- 
-\\  
-=====Examples===== 
- 
-  remove('27.03.2015', 6, 5) = '27.03' 
-  remove('27.03.2015', 7, 2) = '27.03.15' 
-  remove('Mrs. Smith", 3, 1) = 'Mr. Smith' 
-  remove(1203, 2, 2) = '13' 
-  remove((10*10), 1, 1) = '00'  //removes the first single character from '100'. 
-  remove('Alexander', 12, 2) = 'Alexander'  //N_start is past the end of the text - nothing is removed. 
-  remove('Scott', 4, 4) = 'Sco'  //N_chars extends past the end of text; only available characters are removed. 
- 
-\\  
-===== See also ===== 
-  * [[syntax:functions:mid]] 
syntax/functions/remove.txt · Last modified: 2021/08/15 02:53 by craigt

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki