Skip to content
lsl.devlsl.devLSL Dev

llInsertString

function
Function syntax
string llInsertString(
  1. string dst,// Target destination string.
  2. integer index,// Codepoint index where insertion starts.
  3. string src// Source string to insert.
);
Returns
string
Energy
10

i.e. unlike other somewhat similar string functions such as llGetSubString and llDeleteSubString, you cannot use -1 for the counting with this function. You may use instead the function provided a bit further below.

How to use
string result = llInsertString("", 0, "");
Example 1
llInsertString("input", 2, "put out")// returns "input output"
  • Examples: str_replace — Replace all instances of a string with another string in a target string
  • Examples: SplitLine — Insert ‘new line’ escape codes at certain positions of a string
Original wiki source

Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.