$delete
Welcome to our Knowledge Base
Documentation | Blog | Demos | Support
< All Topics
Print
$delete
0 out of 5 stars
5 Stars | 0% | |
4 Stars | 0% | |
3 Stars | 0% | |
2 Stars | 0% | |
1 Stars | 0% |
Deletes a portion of a character string.
Syntax
$delete(source,position,length)
Parameters
source | a character string or an expression that evaluates to a character string |
position | a number or an expression that evaluates to a number |
length | a number or an expression that evaluates to a number |
Return Value
Character string, consisting of source, less those characters starting at position, for a length of length.
Comments
In a string, the position of the first character is always 1. If position is beyond the end of source, or if position is zero or negative, then no characters are deleted from source.
If length is zero or negative, then no characters are deleted from source.
If there are fewer than length characters from position to the end of source, then all characters from position to the end of source are deleted.
Example
$delete("abcdef",2,2)
Evaluates to “adef”.
$delete("613-555-1234",1,4)
Evaluates to “555-1234”.
See Also
Updated
ByJason Lee
Was this article helpful?
0 out of 5 stars
5 Stars | 0% | |
4 Stars | 0% | |
3 Stars | 0% | |
2 Stars | 0% | |
1 Stars | 0% |
5