Definition: | sequence res = remove(sequence src, integer start, integer stop=start) |
Description: |
Remove an item, or a range of items from a sequence.
src: the sequence to remove from. start: the start of the slice to remove. stop: the end of the slice to remove. Returns a sequence with the specified slice or item removed from it. |
Comments: |
This routine, defined in builtins\pseqc.e, is simply src[start..stop] = "" and is provided only
for compatibility with OpenEuphoria.
There is also a map:remove() routine, which is quite different. |
Example: |
s = remove("Johnn Doe", 4) -- s is "John Doe" s = remove({1,2,3,3,4}, 4) -- s is {1,2,3,4} s = remove("John Middle Doe", 6, 12) -- s is "John Doe" s = remove({1,2,3,3,4,4}, 4, 5) -- s is {1,2,3,4} |