-
Delimiters
can someone explain to me what a delimiter is?
i have looked high and low, and found nothing that can help me
all explainations are too elongated for me.
Please explain what they do. Short and Simple
Also, i need string tokenizer help
can anyone explain the actions, expressions,etc of it?
-
Re: Delimiters
it's basically just a character or a set of characters that are used to indicate where a string should be separated
commas are a common example, but if you wanted to split a sentence into words, you could use a space
-
Re: Delimiters
A delimiter is a string that acts as a separator. In the string "apple|banana|orange|grape", the | character is a delimiter, but a delimiter can be longer than 1 character. String tokenizer will use the delimiters you specify as places to split the string apart.
-
Re: Delimiters
how would i use delimiters to find the word "cake" in this sentence?
You are about to eat a wonderfully delicous piece of cake.
-
Re: Delimiters
You wouldn't.. that's not what tokenizing is designed for.
-
Re: Delimiters
then how do i find the word cake in that sentence?
-
Re: Delimiters
Highly doubt this will solve your problem since I can kind of second guess what you're trying to do, but if since this topic is about Delimiters, I'll answer it in the most appropriate way for the topic.
You'd make it so that Cake is inbetween the set delimiters. For example, if you set the delimiter to "," then you can find the word cake by presenting the sentence as: You are about to eat a wonderfully delicious piece of ,cake.
It would be element 2.
-
Re: Delimiters
-
Re: Delimiters
^ lol
You want a search function, which is nothing to do with delimiting.
-
Re: Delimiters
ok...
can anyone tell me how...
-
Re: Delimiters
would the standard search function be suffiecent for this?
-
Re: Delimiters
http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Number=138530&#Post138 530
I've posted an example of using string parser to search for a specific string.
Basically add spaces " " as a delimiter, and then you say have an action like
Compare two general values:
listFind( "String Parser", "cake", 1) = 0
The 1 makes the expression ask if the string is there. If it's there it will return 1, 0 if it's not. If that 1 was a 0 then it would ask if the string was not there, and it would return 1 if it wasn't there, and 0 if it was.
If there is no word "cake" in your string then that event will not fire.
If the string was "The cake is a lie." and you did
Compare two general values:
listFind( "String Parser", "cake", 1) = 1
Then those events would fire as well.
-
Re: Delimiters
( "String Parser", "cake", [color:#FF0000]1[/color]) = [color:#33FF33]1[/color]
???
what are the highlighted parts for?
-
Re: Delimiters
red = flag, which I already explained in my previous post
The green is the other part of the "compare two general values" event.
-
Re: Delimiters
ok, i will see what i can do