Table of Contents

Remove(text, start, length)

Category: Text function


Description

This function removes a substring of text from text, length characters long, and starting with the startth character.


Arguments

ArgumentTypeDescription
textTextAny text value from which the substring of text is removed.
startNumber (Integer)The position of the first character within text to be removed.
lengthNumber (Integer)The number of characters to remove.

Return value type: Text


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', 4, 3) //Returns 'the'  (Starting point past the end of the text; value returned)
remove('Canopus', 4, 6) //Returns 'Can'  (length is past the end of 'Canopus', leading characters returned)


See also