Starts With

From UBot Studio
(Difference between revisions)
Jump to: navigation, search
Line 4: Line 4:
 
'''Text to check:''' The text being checked for the substring.
 
'''Text to check:''' The text being checked for the substring.
  
'''Text to check:''' Substring being searched for.
+
'''Substring to check:''' Substring being searched for.
  
 
Can also be a [[Set|variable]], [[$list item|list item]], [[Set Table Cell|table cell]] or any function.
 
Can also be a [[Set|variable]], [[$list item|list item]], [[Set Table Cell|table cell]] or any function.
Line 18: Line 18:
 
Running the script will return a "True" or "False" if the substring is found.
 
Running the script will return a "True" or "False" if the substring is found.
  
Since the sentence in the variable starts with the substring "Watch", the function returns with "False".
+
Since the sentence in the variable starts with the substring "Watch", the function returns with "True".
  
  
 
[[File:startsw.jpg]]
 
[[File:startsw.jpg]]

Revision as of 20:44, 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.


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 a "True" or "False" if the substring is found.

Since the sentence in the variable starts with the substring "Watch", the function returns with "True".


Startsw.jpg

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox