Inserts a substring in a string after a specified character position. If position = 0, prefixes the substring to the string.
A string.
Insert(substring, string, position)
Parameter |
Description |
|---|---|
substring |
A string or a variable that contains one. String to insert. |
string |
A string or a variable that contains one. String into which to insert substring. |
position |
Integer or variable; position in string after which to insert substring. |
<cfscript>
stringToInsert="ColdFusion"
string="Hello .How are you?"
position=7
completeString=Insert(stringToInsert,string,position)
writeOutput(completeString)
</cfscript>
Output
Hello ColdFusion.How are you?
Sign in to your account