OTX Reference  
OpenTestSystem.Otx.Extensions.StringUtil.Terms.IndexOf Class Reference

Position within a string More...

Inheritance diagram for OpenTestSystem.Otx.Extensions.StringUtil.Terms.IndexOf:
Inheritance graph

Public Attributes

StringTerm _string
 Cardinality [1]
Represents the input string in which the pattern shall be searched. More...
 
StringTerm pattern
 Cardinality [1]
String which is searched for. More...
 
- Public Attributes inherited from OpenTestSystem.Otx.Core.Terms.Term
MetaData metaData
 Cardinality [0..1]
The MetaData type allows tools to store additional, mainly tool-specific data. More...
 

Detailed Description

Position within a string

The IndexOf term gives the zero-based position of the first occurrence of a substring (Pattern) in a String. If not found, it returns -1.

Syntax
IntegerTerm = StringUtil.IndexOf(StringTerm string, StringTerm pattern);
Examples
// Local Declarations
Integer Integer1;
// Flow
Integer1 = StringUtil.IndexOf("emotive company", "com");

Member Data Documentation

◆ _string

StringTerm OpenTestSystem.Otx.Extensions.StringUtil.Terms.IndexOf._string

Cardinality [1]
Represents the input string in which the pattern shall be searched.

◆ pattern

StringTerm OpenTestSystem.Otx.Extensions.StringUtil.Terms.IndexOf.pattern

Cardinality [1]
String which is searched for.

OpenTestSystem.Otx.Extensions.StringUtil.Terms.IndexOf.pattern
StringTerm pattern
Cardinality [1] String which is searched for.
Definition: StringUtil.cs:678