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

Replaces strings More...

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

Public Attributes

StringTerm _string
 Cardinality [1]
Represents the original String. More...
 
NumericTerm index
 Cardinality [1]
Zero-based index - starting position within the string. More...
 
StringTerm replacement
 Cardinality [1]
Represents the String value that shall replace the part starting at index of the original String. 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

Replaces strings

The ReplaceSubString term replaces all occurrences of the Replacement-String within a String and return the result back. The search is started from the specified position (Index).

Exceptions
Core.Exceptions.OutOfBoundsException
Syntax
StringTerm = StringUtil.ReplaceSubString(StringTerm string, StringTerm replacement, NumericTerm index);
StringTerm replacement
Cardinality [1] Represents the String value that shall replace the part starting at index of the orig...
Definition: StringUtil.cs:970
NumericTerm index
Cardinality [1] Zero-based index - starting position within the string.
Definition: StringUtil.cs:980
Examples
// Local Declarations
String String1;
// Flow
String1 = StringUtil.ReplaceSubString("emotive company", "COMPANY", 8);

Member Data Documentation

◆ _string

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

Cardinality [1]
Represents the original String.

◆ index

NumericTerm OpenTestSystem.Otx.Extensions.StringUtil.Terms.ReplaceSubString.index

Cardinality [1]
Zero-based index - starting position within the string.

◆ replacement

StringTerm OpenTestSystem.Otx.Extensions.StringUtil.Terms.ReplaceSubString.replacement

Cardinality [1]
Represents the String value that shall replace the part starting at index of the original String.