Extensions.StringUtil.IndexOf
Revision as of 04:30, 8 August 2014 by Nb (talk | contribs) (Created page with "Category:StringUtil == Classification == {{ClassificationActivity | IndexOf | Position within a string | Term | OTX StringUtil extension | StringUtil...")
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 |
Pseudo-Code Syntax
Integer IndexOf(String string, String pattern);
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 |
Examples
Integer result = IndexOf("emotive", "emo");
//Returns result = 0
See also
ReplaceSubString
MatchToRegularExpression
StringConcatenate
SubString
LengthOfString
SplitString
ToUpper
ToLower
Encode
Decode