insstr
Insert a string into another string
Syntax
insstr(target_string_expr, offset_num, count_num ,replacement_string_expr)
Arguments
target_string_expr | The string to be inserted into. |
offset_num | The character offset from the beginning of target_string_expr where the insertion will take place. The first position is 1, not 0. |
count_num | The number of characters in target_string_expr to be replaced. |
replacement_string_expr | The string to use as the replacement. |
Description
This scalar string function retrieves the string that results from replacing count_num number of characters in the string that results from the evaluation of target_string_expr, beginning at position offset_num. The insstr function replaces these characters with the string that results from evaluation of replacement_string_expr.
Example
Function Result insert("Wayne", 2, 1, "Bill") "WBillyne"