Finding a string within a string
I'm trying to find a piece of string within a string. I'm trying to make my app look through a list and find a match for each entry within a string of text. Like for example, the list goes:
* urk
* blarg
* zoorg
and the text goes: zoorg was shocked by the appearance the notorious blarg, "urk!", he cried
I'm using a loop for all this and the string parser object, problem is, it was so long since I used it I've forgotten what functions to use. I'm certain I've done something similiar to this before.
Grateful for any help!
Re: Finding a string within a string
You can use the string parser 2 object and use the string you are trying to find as a delimiter.
Re: Finding a string within a string
Re: Finding a string within a string
I can't get it to work. I add the text I want it to find in the line of string as a delimiter but I'm not sure which condition I'm supposed to use to find any elements. I've tried several but there is no reaction.
Re: Finding a string within a string
Quote:
Originally Posted by Chrille
I can't get it to work. I add the text I want it to find in the line of string as a delimiter but I'm not sure which condition I'm supposed to use to find any elements. I've tried several but there is no reaction.
How about the "On Start of Frame" condition to trigger your event?
Re: Finding a string within a string
I could use anything to trigger the event, but I'm looking for which String Parser Object condition to use to look for the appearance of the delimiter in the line of text. 'Get number of elements > 1' doesn't help unless there are words before and after the delimiter in question, and I'd like for it to work if there was only one word in the line of text.