Skip to content
Jonathan Chan edited this page Jun 12, 2018 · 1 revision

string-insert-at inserts the string s into the string str at index i.

Parameter Description
str String to be inserted into (note that this does not mutate str itself, but rather creates a new string).
s String to insert.
i Index at which to insert s into str. Note that 0 <= i <= (string-length str) must be true or an exception will be thrown.

Example

Example 1: Insert a space into a string.

> (string-insert-at "LoremIpsum" " " 5)
"Lorem Ipsum"
Clone this wiki locally