# 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

# Arguments

| Argument | Type | Required | Description | Default |
|----------|------|----------|-------------|---------|
| substring | string | Yes | String to insert. |  |
| string | string | Yes | String into which to insert substring. |  |
| position | number | Yes | position in string after which to insert substring. |  |

# Examples

```1
	str="I love ";
	writeDump(insert("lucee",str,7));//I love lucee
	//Member function
	st="Example";
	writeDump(st.insert(" code",7));//Example code
```







# Categories

[Strings](../../categories/string.md)

# See Also

[string.insert()](../objects/string/insert.md)