Returns the index at which a substring is first found within a given string. If the substring is not found, the result is 0.
string (required) The text to search.
substring (required) The text to search with.
NOTE: Find is case-sensitive. To create a search that is no case sensitive, you can combine Find with Lower.
- Returns 6
- The string “cook” starts on the 6th letter.
Find(“milk+cookies”, “chocolate milk”)
- Returns 0 because the substring is not found.
Find(“Abe Lincoln”, “lincoln”) = 0
- Returns 0 because the substring is not found. Find is case-sensitive
Find(“San Francisco County”, “ “)
- Returns 4 because Find searches from left to right and returns the first instance of the substring.
More About Text Functions
Text functions analyze or manipulate string data and are useful sanitizing string input.
When inputting a string, use quotation marks to indicate it as a string. “This is read as a string”
If you would like to include quotes in your string, you can use a slash \ to indicate the following quote is part of the string. “\”This is a string with quotes\”” will display as “This is a string with quotes”