insert_string.m¶
Basic Information¶
SYNTAX: strout = insert_string(str2insert,string,indices)
PURPOSE: Insert a specified substring within a given string at one
or more locations.
INPUT:
str2insert = string to insert
string = string to insert it into
indices = indices in string at which to insert (length>=1)
(inserts BEFORE the character located at each index)
OUTPUT:
strout = string resulting from the insertions
RESTRICTIONS: