Difference between revisions of "Right"

From Second Life Wiki
Jump to: navigation, search
m (woops ^^;)
(/me resolves to proof read better.)
Line 24: Line 24:
Posted here with the kind permission of {{User|Very Keynes}}. Originally posted February 2008 at http://forums.secondlife.com/showthread.php?t=243445 .

Revision as of 17:51, 14 July 2008


Function: string right( string src, string divider );

Returns text right of a specified separator
Returns a string that is the text in src that is right of the first occurrence of divider.

• string src
• string divider

If divider is not found then src is returned in it's entirety.

See also: Left


<lsl>string right(string src, string divider) {

   integer index = llSubStringIndex( src, divider );
       return llDeleteSubString( src, 0, index + llStringLength(divider) - 1);
   return src;



<lsl>string value = right("Colour=Brown", "="); //value == "Brown"</lsl>