OsStringLastIndexOf
From OpenSimulator
(Difference between revisions)
(Created page with "{{osslfunc |permissions=true |threat_level= |function_syntax=integer osStringLastIndexOf(string src, string value, integer ignoreCase) |ossl_example=<source lang = "lsl"> // E...") |
|||
(One intermediate revision by one user not shown) | |||
Line 10: | Line 10: | ||
state_entry() | state_entry() | ||
{ | { | ||
− | llSay(PUBLIC_CHANNEL, "Touch me to show | + | llSay(PUBLIC_CHANNEL, "Touch me to show osStringLastIndexOf"); |
} | } | ||
Line 17: | Line 17: | ||
string src = "abcdefDeg"; | string src = "abcdefDeg"; | ||
string val = "DE"; | string val = "DE"; | ||
− | llOwnerSay((string) | + | llOwnerSay((string)osStringLastIndexOf(src, val, TRUE)); |
} | } | ||
} | } |
Latest revision as of 16:55, 1 May 2019
integer osStringLastIndexOf(string src, string value, integer ignoreCase)
| |
Reports the zero-based index of the last occurrence of string value withing string scr. returns -1 if not found. It can compare ignoring case with ignoreCase TRUE(1) or considering case if FALSE(0); | |
Threat Level | No threat level specified |
Permissions | Use of this function is always allowed by default |
Extra Delay | No function delay specified |
Example(s) | |
// Example of osStringRemove default { state_entry() { llSay(PUBLIC_CHANNEL, "Touch me to show osStringLastIndexOf"); } touch_start(integer n) { string src = "abcdefDeg"; string val = "DE"; llOwnerSay((string)osStringLastIndexOf(src, val, TRUE)); } } |