string llDeleteSubString(string source, integer start, integer end)
Returns a copy of
source with the indicated substring removed. The
source is unaltered.
The
start and
end are inclusive, so
0, length - 1 would return an empty string and
0,0 would delete the first character. Using negative numbers for
start and/or
end causes the index to count backwards from the length of the string, so
0, -1 would delete the entire string. If
start is larger than
end the substring is the exclusion of the entries, so
6, 4 would delete the entire string except for the 5th character.
This
function is relatively slow.
Compare to
llGetSubString.
Example:
string test = "Example";
llSay(0, llDeleteSubString(test, 2, 5)); // outputs "Exe", deletes charaters 2 - 5 "ampl"
This article wasn't helpful for you? Maybe the
related article at the LSL Portal is able to bring enlightenment.
Functions |
String