|
Haravikk Mistral
Registered User
Join date: 8 Oct 2005
Posts: 2,482
|
11-16-2006 03:05
A simple LSL function, exactly the same as llSubStringIndex, except that it returns the LAST instance of the sub-string (ie it starts from the end and works its way forward, or goes forward keeping track of the highest index it found and keeps going to see if there are any-more). As it is currently it's rather difficult to split a string on the LAST occurrance of a sub-string, since you have to parse it into a list, then concatenate the parts in to the two strings you'd expect to be left with. Or you have to go through using llGetSubString() for each character yourself, both rather messy  index llSubStringIndex(string str, string subStr);
_____________________
Computer (Mac Pro): 2 x Quad Core 3.2ghz Xeon 10gb DDR2 800mhz FB-DIMMS 4 x 750gb, 32mb cache hard-drives (RAID-0/striped) NVidia GeForce 8800GT (512mb)
|
|
Lex Neva
wears dorky glasses
Join date: 27 Nov 2004
Posts: 1,361
|
11-16-2006 11:34
Also useful would be the ability to search for the first match of a substring starting from a given position.
|