|
-
May 24th, 2004, 11:08 AM
#1
Thread Starter
Fanatic Member
Cases for a String [RESOLVED]
Hi,
It looks like im on a kinda post madness episode here, but I have a lot of questions for the program i am making.
Here's the situation.
When I receive some text from my client, it gets put into a string.
Now, I need some pretty hefty checking in the string. As the text is being written by a user, the server needs to be able to interprete what the user is trying to say to some degree.
Now, first of all i would need to know if you could do this with cases... could you give the same response to several different strings?
Because like "Hello" "Hiya" "Hey" " Hi" have all the same meaning, and i would like to give one response.
So could something like
Case "Hello" Or "Hiya" Or "Hey" Or "Hi"
work? Or how would i go about doing that? I have never used Cases before, and i am going from the examples here.
And also, after i have that sorted, there may be a bit more of a prob. The string isn't going to be EXACTLY one of those responses.
The user could have put a space before " Hello" like that, or after it, so doing a definite lookup won't help. The user might even say "Hello mate" instead, so i need it to recognize a single word within a sentence like this.
At later times, i will make it more advanced but i need help at this stage on just getting the fundamentals down.
So I'll really appreciate any insight on this, as i am kind of stuck of what to do to make it react like i want it.
Thanks very much!
Last edited by LITHIA; May 24th, 2004 at 12:34 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|