$insert

$insert

Welcome to our Knowledge Base

Documentation | Blog | Demos | Support

< All Topics
Print

$insert

Inserts a character string into another character string.

Syntax

$insert(source,position,string)

Parameters

sourcea character string, or expression that evaluates to a character string
positiona number or an expression that evaluates to a number
stringa 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

$delete

$fill

$left

$position

$replace

$right

$squeeze

$substring

$translate

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
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.

Deixe um comentário

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *

pt_BRPortuguese