Difference between revisions of "LlInsertString"

From Second Life Wiki
Jump to: navigation, search
m (lsl code tagging)
m
Line 1: Line 1:
{{multi-lang}}{{LSL_Function/negative_index|false|position}}{{LSL_Function|func_id=96|func_sleep=0.0|func_energy=10.0
+
{{multi-lang}}{{LSL_Function/negative_index|false|pos}}{{LSL_Function|func_id=96|func_sleep=0.0|func_energy=10.0
 
|func=llInsertString|return_type=string
 
|func=llInsertString|return_type=string
 
|p1_type=string|p1_name=dst|p1_desc=destination of insertion
 
|p1_type=string|p1_name=dst|p1_desc=destination of insertion

Revision as of 02:08, 5 June 2008

Summary

Function: string llInsertString( string dst, integer pos, string src );

Returns a string dst with src inserted starting at pos.

• string dst destination of insertion
• integer pos position index for insert, first is 0
• string src source string to be inserted

pos does not support negative indexes.

Caveats

  • If pos is out of bounds the script continues to execute without an error message.
All Issues ~ Search JIRA for related Bugs

Examples

<lsl> llInsertString("input", 2, "put out")// returns "input output"

</lsl>

See Also

Functions

•  llDeleteSubString
•  llGetSubString

Articles

•  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

Deep Notes

Search JIRA for related Issues

Signature

function string llInsertString( string dst, integer pos, string src );