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 revision
Previous revision
syntax:functions:remove [2015/04/03 18:44] dmitrysyntax:functions:remove [2021/08/15 02:53] (current) – [See also] craigt
Line 1: Line 1:
-===== Remove(text, NK) =====+======Remove(text, startlength) =====
 +Category:  Text function
  
-Removes //K// characters from the //text//, starting with the //N//-th character, where //N// and //K// are numbers.+\\  
 +=====Description===== 
 +This function removes a substring of text from //text////length// characters longand starting with the //start//<sup>th</sup> character.
  
-First argument is implicitly converted into text, if required.+\\  
 +=====Arguments===== 
 +^Argument^Type^Description^ 
 +|text|Text|Any text value from which the substring of text is removed.| 
 +|start|Number (Integer)|The position of the first character within //text// to be removed.| 
 +|length|Number (Integer)|The number of characters to remove.|
  
- Example   Result  ^ +**Return value type:** Text 
- remove('27.03.2015', 6  |  27.03  | + 
- remove('27.03.2015', 7)  |  27.03.15  |+\\  
 +=====Remarks===== 
 +Number values entered for //text// are implicitly converted to text. 
 + 
 +Entering a value for //start// that is past the number of characters in //text// returns the full //text// value. 
 + 
 +Entering a value for //length// that exceeds the number of characters after the //start// position, returns the leading characters in //text// up to the //start// position.  
 + 
 +\\  
 +=====Examples===== 
 +  remove('Betelgeuse', 2, 4) //Returns 'Bgeuse' 
 + 
 +  remove('Pleiades', 1, 3) //Returns 'iades' 
 + 
 +  remove(32876, 2, 2) //Returns '376' (Numbers implicitly converted; return value is text) 
 + 
 +  remove('the', 43//Returns 'the'  (Starting point past the end of the text; value returned) 
 + 
 +  remove('Canopus', 46//Returns 'Can'  (length is past the end of 'Canopus', leading characters returned) 
 +  
 +\\  
 +=====See also===== 
 +  * [[syntax:functions:removechars|RemoveChars(text, chars)]] 
 +  * [[syntax:functions:removeend|RemoveEnd(text, length)]] 
 +  * [[syntax:functions:removestart|RemoveStart(text, length)]] 
 +  * [[syntax:functions:removetext|RemoveText(text, string)]]
  
-**See also** 
-  * [[syntax:functions:mid]] 
syntax/functions/remove.1428101092.txt.gz · Last modified: 2015/04/03 18:44 by dmitry

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki