diff options
author | David Walter Seikel | 2012-02-23 02:03:46 +1000 |
---|---|---|
committer | David Walter Seikel | 2012-02-23 02:03:46 +1000 |
commit | fac4cd7dcc85790b6eb2fb676108957acfda78bb (patch) | |
tree | 6e848fd33cc27d5dbd566c7a6fb74473b1823558 /LuaSL | |
parent | Make the test command called output a bit neater. (diff) | |
download | SledjHamr-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.lua | 10 |
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() | |||
601 | end | 601 | end |
602 | 602 | ||
603 | 603 | ||
604 | -- LSL string functions | ||
605 | function --[[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) | ||
611 | end | ||
612 | |||
613 | |||
604 | -- Crements stuff. | 614 | -- Crements stuff. |
605 | 615 | ||
606 | function LSL.preDecrement(name) _G[name] = _G[name] - 1; return _G[name]; end; | 616 | function LSL.preDecrement(name) _G[name] = _G[name] - 1; return _G[name]; end; |