Inserts a substring in a string after a specified character position. If position
= 0, prefixes the substring to the string.
Insert(substring, string, position)
<h3>Insert Example</h3> <cfif IsDefined("FORM.myString")> <!--- if the position is longer than the length of the string, err ---> <cfif FORM.insertPosition GT Len(MyString)> <cfoutput> <p>This string only has #Len(MyString)# characters; therefore, you cannot insert the substring #FORM.mySubString# at position #FORM.insertPosition#. </cfoutput> </cfif> <cfelse> <cfoutput> <p>You inserted the substring #FORM.MySubstring# into the string #FORM.MyString#, resulting in the following string: <br>#Insert(FORM.MySubString, FORM.myString, FORM.insertposition)# </cfoutput> </cfif>