Insert()
Inserts a substring in a string after a specified character position.
If position = 0, prefixes the substring to the string.
Insert( substring=string, string=string, position=number );
Returns: String
Examples
str="I love ";
writeDump(insert("lucee",str,7));//I love lucee
//Member function
st="Example";
writeDump(st.insert(" code",7));//Example code
See also
- Strings
- string.insert()
- Search Issue Tracker
- Search Lucee Test Cases (good for further, detailed examples)