Difference between revisions of "User:Free Portal/Sandbox"
Jump to navigation
Jump to search
Free Portal (talk | contribs) |
Free Portal (talk | contribs) m |
||
Line 28: | Line 28: | ||
llOwnerSay("__" + llGetObjectName() + " :: " + llGetScriptName() + " :: " + msg | llOwnerSay("__" + llGetObjectName() + " :: " + llGetScriptName() + " :: " + msg | ||
}</lsl> | }</lsl> | ||
</div> | |||
</div> | </div> | ||
Line 45: | Line 46: | ||
}</lsl> | }</lsl> | ||
</div> | </div> | ||
</div> | </div> |
Latest revision as of 05:58, 20 June 2010
Free Portal | Sandbox | Script Library | Projects | Documents | Friends | Links |
SandBox
Usefull user function package for LSL
searchReplace
search replace string <lsl>string searchReplace(string input, string old, string new) {
return llDumpList2String(llParseString2List(input, [old], []), new);
}</lsl>
DEBUG
print debug message <lsl>integer debug = TRUE;
string DEBUG(string msg) {
if (DEBUG) llOwnerSay("__" + llGetObjectName() + " :: " + llGetScriptName() + " :: " + msg
}</lsl>
Get between String
get string of between 2 word <lsl>string getBetweenString(string str, string pre, string suf) {
if ((llSubStringIndex(str, pre) == -1) || (llSubStringIndex(str, suf) == -1)) return NULL_KEY; return llGetSubString( str, llSubStringIndex(str, pre) + llStringLength(pre), llSubStringIndex(str, suf)-1);
}</lsl>