Difference between revisions of "Right"

From Second Life Wiki
Jump to: navigation, search
(New page: {{LSL Header}} __NOTOC__ <div id="box"> == Function: string right(string {{LSL Param|src}}, string {{LSL Param|divider}}); == <div style="padding: 0.5em;"> Returns text right o...)
(No difference)

Revision as of 09:56, 13 July 2008

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

Returns text right of a specified separator

See also: Left

Example:

string notecardparameter = right(sdata,"="); //in a notecard line that reads Colour=Brown, returns "Brown"


Specification

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

      integer iStart = llSubStringIndex( src, divider ) + 1;
      string result = llGetSubString( src, iStart, llStringLength(src) - 1 ) ;
      return result;

}

</lsl>