Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Improvements to llSubStringIndex and llListFindList

Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
02-16-2005 12:56
Hello all!
I think:
integer llSubStringFirstIndex(string src, string pattern, integer start)
that starts searching in src at the integer specified as start for pattern,

integer llSubStringLastIndex(string src, string pattern, integer end)
that starts searching backwards in src, from end, for pattern,

integer llListFindListFirstIndex(list src, list find, integer start)
that starts searching in src at the index start for find,

integer llListFindListLastIndex(list src, list find, integer end)
that starts searching backwards in src, starting at the index end, for find,

should be implemented. These would make the life of people who parse SO much easier, and would dramatically decrease the memory and CPU footprint of scripts that need to search large lists and strings. :)
==Chris
Jeffrey Gomez
Cubed™
Join date: 11 Jun 2004
Posts: 3,522
02-16-2005 13:50
Now THIS is something I would endorse. Or, even better:

llMirrorSubString(string src, integer start, integer end)

Mirrors target string. For example:

"This is a test" mirrored in its entirety would read: "tset a si sihT"

A list option for that would also be nice, though llListSort can be cheated to do something like that.

Backwards thinking, I'm sure - but in a way, also capable of what you're asking for there, Chris. And yeah - it would save the time it takes to parse all that through a loop. :D
_____________________
---
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
02-16-2005 13:55
Yes Please I posted that I wanted this when I was a noob.

<Approved>
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
Oz Spade
ReadsNoPostLongerThanHand
Join date: 23 Sep 2003
Posts: 2,708
02-17-2005 01:21
I endorse these.
_____________________
"Don't anticipate outcome," the man said. "Await the unfolding of events. Remain in the moment." - Konrad