$insert
Welcome to our Knowledge Base
Documentation | Blog | Demos | Support
< All Topics
Print
$insert
0 out of 5 stars
5 Stars | 0% | |
4 Stars | 0% | |
3 Stars | 0% | |
2 Stars | 0% | |
1 Stars | 0% |
Inserts a character string into another character string.
Syntax
$insert(source,position,string)
Parameters
source | a character string, or expression that evaluates to a character string |
position | a number or an expression that evaluates to a number |
string | a character string, or expression that evaluates to a character string |
Return Value
Character string consisting of source, with string embedded starting at the specified position.
Comments
Use $insert to produce a string consisting of source, with string embedded starting at position.
In a string, the position of the first character is always 1. If position is beyond the end of source, then string is appended to source. If position is zero or negative, then source is left unchanged.
Example
$insert("12345",3,"abc")
Evaluates to “12abc345”.
$insert("abc",1,"de")
Evaluates to “deabc”.
$insert("abc",4,"def")
Evaluates to “abcdef”.
$insert($delete("abcdef,2,2),2,"123")
Evaluates to “a123def”.
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