Difference between revisions of "Extensions.StringUtil.IndexOf"
Jump to navigation
Jump to search
(Created page with "Category:StringUtil == Classification == {{ClassificationActivity | IndexOf | Position within a string | Term | OTX StringUtil extension | StringUtil...") |
|||
Line 3: | Line 3: | ||
{{ClassificationActivity | IndexOf | Position within a string | [[Term]] | [[StringUtil|OTX StringUtil extension]] | [[StringUtil related terms]] | - | - }} | {{ClassificationActivity | IndexOf | Position within a string | [[Term]] | [[StringUtil|OTX StringUtil extension]] | [[StringUtil related terms]] | - | - }} | ||
− | == | + | == OTL Syntax == |
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
− | + | IntegerTerm = IndexOf(StringTerm, StringTerm); | |
</syntaxhighlight> | </syntaxhighlight> | ||
Line 20: | Line 20: | ||
|} | |} | ||
− | == Examples == | + | == OTL Examples == |
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
− | Integer | + | Integer Integer1; |
− | + | ||
+ | Integer1 = IndexOf("emotive company", "com"); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 10:40, 10 February 2015
Contents
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.
![]()
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