Extensions.StringUtil.IndexOf

From emotive
Revision as of 10:40, 10 February 2015 by Tl (talk | contribs)
Jump to navigation Jump to search

Classification

Name IndexOf
Short Description Position within a string
Class Term
Extension OTX StringUtil extension
Group StringUtil related terms
Exceptions -
Checker Rules -
Standard Compliant Yes

OTL Syntax

IntegerTerm = IndexOf(StringTerm, StringTerm);

Description

The IndexOf term returns the zero-based position of the first occurrence of a substring (pattern) in a string , otherwise -1.

Return Value

The Term returns the value, see table below.

Icons Note.png In OTX, Terms are categorized according to its return data type!
Data Type Description
Integer The first occurrence of a substring (pattern) in a string. If the substring in the string, then -1 is returned

Properties

Name Data Type Class Default Cardinality Description
String String Term - [1] The original string
Pattern String Term - [1] The substring to search

OTL Examples

Integer Integer1;

Integer1 = IndexOf("emotive company", "com");

See also

ReplaceSubString
MatchToRegularExpression
StringConcatenate
SubString
LengthOfString
SplitString
ToUpper
ToLower
Encode
Decode