Difference between revisions of "User:Ugleh Ulrik"
Ugleh Ulrik (talk | contribs) |
Ugleh Ulrik (talk | contribs) |
||
Line 54: | Line 54: | ||
<lsl> | <lsl> | ||
string trimstring(string text, integer length) { | string trimstring(string text, integer length) { | ||
if (length < llStringLength(text)){ | |||
length = length-1; | length = length-1; | ||
string newstring = llGetSubString(text,0, length) + "..."; | string newstring = llGetSubString(text,0, length) + "..."; | ||
return newstring; | return newstring; | ||
}else{ | |||
return text; | |||
} | |||
} | } | ||
</lsl> | </lsl> | ||
More at [[User:Ugleh_Ulrik/trimstring]] | More at [[User:Ugleh_Ulrik/trimstring]] |
Revision as of 18:40, 20 April 2010
About
Before Ugleh Ulrik, I was Ugleh Ugajin, hanging with the wrong gang which got me banned. I am now back as a Expert programmer in SLS and more. I code for cheap or even free. I love making weapons, and creating new things to put in an attack hud. Most of my time I sell stuff that should be worth alot, for free. If you see me in SL the chances are im scripting, or teaching people how to script.
XStreetSL
Vector2List
<lsl> list Vector2List(vector v){
list alist = llParseString2List((string)v,[",", ">", "<"],[]);
return alist; } </lsl> More at User:Ugleh_Ulrik/Vector2List
FirstName
<lsl> string FirstName(key k){ list fn = llParseString2List(llKey2Name(k),[" "],[]); string firstn = llList2String(fn,0); return firstn; } </lsl> More at User:Ugleh_Ulrik/FirstName
LastName
<lsl> string LastName (key k){ list ln = llParseString2List(llKey2Name(k),[" "],[]); string lastn = llList2String(ln,1); return lastn; } </lsl> More at User:Ugleh_Ulrik/LastName
trimstring
<lsl> string trimstring(string text, integer length) {
if (length < llStringLength(text)){ length = length-1; string newstring = llGetSubString(text,0, length) + "..."; return newstring;
}else{
return text;
} } </lsl> More at User:Ugleh_Ulrik/trimstring