Starts With
From UBot Studio
(Difference between revisions)
Line 16: | Line 16: | ||
− | Running the script will return | + | Running the script will return "True" if the substring is found or "False" if the substring is not found. |
Since the sentence in the variable starts with the substring "Watch", the function returns with "True". | Since the sentence in the variable starts with the substring "Watch", the function returns with "True". |
Latest revision as of 20:47, 22 June 2015
This function is an Advanced Text function in the UBot Extended Library. This function checks whether a string begins with specified text.
Text to check: The text being checked for the substring.
Substring to check: Substring being searched for.
Can also be a variable, list item, table cell or any function.
[edit] Example
set(#sentence,"Watch these bite-sized sessions once you\'ve made your purchase. ","Global") alert($starts with(#sentence,"Watch"))
Running the script will return "True" if the substring is found or "False" if the substring is not found.
Since the sentence in the variable starts with the substring "Watch", the function returns with "True".