Difference between revisions of "Extensions.StringUtil.IndexOf"

From emotive
Jump to navigation Jump to search
m (Hb moved page IndexOf to Extensions.StringUtil.IndexOf: #3153)
Line 1: Line 1:
[[Category:StringUtil]]
+
{{DISPLAYTITLE:'''IndexOf '''}}[[Category:StringUtil]]
 
== Classification ==
 
== Classification ==
{{ClassificationActivity | IndexOf | Position within a string | [[Term]] | [[StringUtil|OTX StringUtil extension]] | [[StringUtil related terms]] | - | - }}
+
{{ClassificationActivity | IndexOf | Position within a string | [[Term]] | [[Extensions.StringUtil|OTX StringUtil extension]] | [[StringUtil related terms]] | - | - }}
  
 
== OTL Syntax ==
 
== OTL Syntax ==
Line 11: Line 11:
 
The '''IndexOf''' term returns the zero-based position of the first occurrence of a substring (pattern) in a string , otherwise -1.
 
The '''IndexOf''' term returns the zero-based position of the first occurrence of a substring (pattern) in a string , otherwise -1.
  
{{TermReturnValue| [[Integer]] | The first occurrence of a substring (pattern) in a string. If the substring in the string, then -1 is returned}}
+
{{TermReturnValue| [[Core.DataTypes.SimpleDataType.Integer|Integer]] | The first occurrence of a substring (pattern) in a string. If the substring in the string, then -1 is returned}}
  
 
== Properties ==
 
== Properties ==
 
{| {{TableHeader}}
 
{| {{TableHeader}}
 
{{TableRowPropertiesHeader}}
 
{{TableRowPropertiesHeader}}
{{TableRowPropertie1| String | [[String]] | [[Term]] | - | [1] | The original string}}
+
{{TableRowPropertie1| String | [[Core.DataTypes.SimpleDataType.String|String]] | [[Term]] | - | [1] | The original string}}
{{TableRowPropertie2| Pattern | [[String]] | [[Term]] | - | [1] | The substring to search}}
+
{{TableRowPropertie2| Pattern | [[Core.DataTypes.SimpleDataType.String|String]] | [[Term]] | - | [1] | The substring to search}}
 
|}
 
|}
  
Line 28: Line 28:
  
 
== See also ==
 
== See also ==
[[ReplaceSubString]] <br/>
+
[[Extensions.StringUtil.ReplaceSubString|ReplaceSubString]] <br/>
[[MatchToRegularExpression]] <br/>
+
[[Extensions.StringUtil.MatchToRegularExpression|MatchToRegularExpression]] <br/>
[[StringConcatenate]] <br/>
+
[[Extensions.StringUtil.StringConcatenate|StringConcatenate]] <br/>
[[SubString]] <br/>
+
[[Extensions.StringUtil.SubString|SubString]] <br/>
[[LengthOfString]] <br/>
+
[[Extensions.StringUtil.LengthOfString|LengthOfString]] <br/>
[[SplitString]] <br/>
+
[[Extensions.StringUtil.SplitString|SplitString]] <br/>
[[ToUpper]] <br/>
+
[[Extensions.StringUtil.ToUpper|ToUpper]] <br/>
[[ToLower]] <br/>
+
[[Extensions.StringUtil.ToLower|ToLower]] <br/>
[[Encode]] <br/>
+
[[Extensions.StringUtil.Encode|Encode]] <br/>
[[Decode]]
+
[[Extensions.StringUtil.Decode|Decode]]

Revision as of 03:41, 16 February 2016

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