aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/LuaSL
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-02-23 02:03:46 +1000
committerDavid Walter Seikel2012-02-23 02:03:46 +1000
commitfac4cd7dcc85790b6eb2fb676108957acfda78bb (patch)
tree6e848fd33cc27d5dbd566c7a6fb74473b1823558 /LuaSL
parentMake the test command called output a bit neater. (diff)
downloadSledjHamr-fac4cd7dcc85790b6eb2fb676108957acfda78bb.zip
SledjHamr-fac4cd7dcc85790b6eb2fb676108957acfda78bb.tar.gz
SledjHamr-fac4cd7dcc85790b6eb2fb676108957acfda78bb.tar.bz2
SledjHamr-fac4cd7dcc85790b6eb2fb676108957acfda78bb.tar.xz
Implement llGetSubString().
Diffstat (limited to 'LuaSL')
-rw-r--r--LuaSL/src/LSL.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/LuaSL/src/LSL.lua b/LuaSL/src/LSL.lua
index ea16285..216f0a7 100644
--- a/LuaSL/src/LSL.lua
+++ b/LuaSL/src/LSL.lua
@@ -601,6 +601,16 @@ function --[[string]] LSL.llGetScriptName()
601end 601end
602 602
603 603
604-- LSL string functions
605function --[[string]] LSL.llGetSubString( --[[string]] text, --[[integer]] start, --[[integer]] End)
606 -- Deal with the impedance mismatch.
607 if 0 <= start then start = start + 1 end
608 if 0 <= End then End = End + 1 end
609-- TODO - If start is larger than end the substring is the exclusion of the entries, so 6,4 would give the entire string except for the 5th character.
610 return string.sub(text, start, End)
611end
612
613
604-- Crements stuff. 614-- Crements stuff.
605 615
606function LSL.preDecrement(name) _G[name] = _G[name] - 1; return _G[name]; end; 616function LSL.preDecrement(name) _G[name] = _G[name] - 1; return _G[name]; end;