CodeBase - Easy-To-Use String Search Function
Return to the CodeBase listing
Category: Text
Version: 1.1
Information
Uploaded: 27th May 2007 13:22
Modified: 1st Jan 1970 01:00
Author: BMacZero
Summary
Search a sentence for a given word.
Full Description
This function will take two strings and search the first string for the second one. It returns a 1 if the string is found, and a 0 if it is not. The third variable is the Case Flag, when set to 0 the function is not case sensitive, any other value will make it Case Sensitive. Please note that this function was made for text adventures, so essentially it searches a sentence for a word and it will not find the search string if it doesn't have spaces around it. Example: Searching "I like cheese" for "like" will return a 1, while searching "Ilikecheese" for "like" will return 0.<br /> SYNTAX: Return Integer=Search(Search this string,Search for this string,Case Flag)
Comments
No comments yet.