|
Christif Vaher
Registered User
Join date: 24 Jun 2008
Posts: 51
|
02-15-2009 21:03
I am looking for the fastest way to parse a chat string and compare it to 4 strings to see if there is a match. Basically I have a text string
"The brown fox ran really fast."
and I want to see if anywhere in there the words
"brown" , "orange", "white", "go" appear.
The 4 words being searched for are a varied length.
Any suggestions would be appreciated.
|
|
SuezanneC Baskerville
Forums Rock!
Join date: 22 Dec 2003
Posts: 14,229
|
02-15-2009 21:37
"Brown" does appear, "orange", "white", and "go" don't appear. Problem solved. Next question? I believe llSubStringIndex , at http://wiki.secondlife.com/wiki/LlSubStringIndex , is what you want.
_____________________
-
So long to these forums, the vBulletin forums that used to be at forums.secondlife.com. I will miss them.
I can be found on the web by searching for "SuezanneC Baskerville", or go to
http://www.google.com/profiles/suezanne
-
http://lindenlab.tribe.net/ created on 11/19/03.
Members: Ben, Catherine, Colin, Cory, Dan, Doug, Jim, Philip, Phoenix, Richard, Robin, and Ryan
-
|
|
Destiny Niles
Registered User
Join date: 23 Aug 2006
Posts: 949
|
02-15-2009 22:04
I would use llParseString2List and llListFindList
|
|
Pedro McMillan
SLOODLE Developer
Join date: 28 Jul 2007
Posts: 231
|
02-16-2009 02:50
If you're using case sensitive functions to do the parsing, you'll need to remember to convert the string to either all lower or all upper case before doing the parsing. For example: http://wiki.secondlife.com/wiki/LlToLower
|