Substring

From UBot Studio
Revision as of 16:14, 20 November 2012 by LillyT (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

$Substring is a Text Function.

The function returns the specified part of an original string.

The substring begins at a given starting point and extends up to the given length. Again, this function can be used the way that the other functions can be used, except this finds the determined subtext of a string.

The function can be used along with the Text Length and Find Index functions to determine the substring of an item in a string.

The text length function finds the length of the substring in the place in the substring function labeled "Number of Characters".

The find index function finds the starting point for the substring being searched for within the original text.


Example

navigate("http://www.ubotstudio.com/playground/simple-form", "Wait")
type text(<username field>, $substring("UBot Studio", $find index("UBot Studio", "Studio"), $text length("Studio")), "Standard")

Running the script fills the field with the substring at the starting point and with the number of characters specified in the substring function. In this case the substring is the word "Studio".

File:Substring.png

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox