Count Text
From UBot Studio
(Difference between revisions)
(Created page with " This function is an Advanced Text function in the UBot Extended Library. This function will count the number of times a substring appears in text. '''Text:''' The string...") |
|||
Line 2: | Line 2: | ||
This function is an [[Advanced Text]] function in the UBot Extended Library. This function will count the number of times a substring appears in text. | This function is an [[Advanced Text]] function in the UBot Extended Library. This function will count the number of times a substring appears in text. | ||
− | '''Text:''' The | + | '''Text to search in:''' The text the substring is being counted in. |
+ | |||
+ | '''Text to search for:''' The substring being counted | ||
== Example == | == Example == |
Latest revision as of 23:35, 17 June 2015
This function is an Advanced Text function in the UBot Extended Library. This function will count the number of times a substring appears in text.
Text to search in: The text the substring is being counted in.
Text to search for: The substring being counted
[edit] Example
set(#sampletext,"Want to use UBot Studio or UBot Studio bots, but don’t want them running on your Windows machine or don’t have a Windows machine?","Global") alert($count text(#sampletext,"Windows"))
Running the script will count how many times the word "Windows" appears in the sentence provided in the variable.
According to the function, the word "Windows" appears in the sentence 2 times.