aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--LuaSL/src/LSL.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/LuaSL/src/LSL.lua b/LuaSL/src/LSL.lua
index de7f956..3ca31a8 100644
--- a/LuaSL/src/LSL.lua
+++ b/LuaSL/src/LSL.lua
@@ -602,7 +602,7 @@ end
602 602
603 603
604-- LSL string functions 604-- LSL string functions
605function --[[string]] LSL.llGetSubString( --[[string]] text, --[[integer]] start, --[[integer]] End) 605function --[[string]] LSL.llGetSubString(--[[string]] text, --[[integer]] start, --[[integer]] End)
606 -- Deal with the impedance mismatch. 606 -- Deal with the impedance mismatch.
607 if 0 <= start then start = start + 1 end 607 if 0 <= start then start = start + 1 end
608 if 0 <= End then End = End + 1 end 608 if 0 <= End then End = End + 1 end
@@ -610,6 +610,11 @@ function --[[string]] LSL.llGetSubString( --[[string]] text, --[[integer]] start
610 return string.sub(text, start, End) 610 return string.sub(text, start, End)
611end 611end
612 612
613function --[[integer]] LSL.llSubStringIndex(--[[string]] text, --[[string]] sub)
614 local start, End = string.find(text, sub, 1, true)
615 if nil == start then return -1 else return start - 1 end
616end
617
613 618
614-- Crements stuff. 619-- Crements stuff.
615 620