Difference between revisions of "Extensions.StringUtil.ReplaceSubString"

From emotive
Jump to navigation Jump to search
Line 1: Line 1:
[[Category:StringUtil]]
+
{{DISPLAYTITLE:'''ReplaceSubString '''}}[[Category:StringUtil]]
 
== Classification ==
 
== Classification ==
{{ClassificationActivity | ReplaceSubString | Replacing strings | [[Term]] | [[StringUtil|OTX StringUtil extension]] | [[StringUtil related terms]] | [[OutOfBoundsException]] | - }}
+
{{ClassificationActivity | ReplaceSubString | Replacing strings | [[Term]] | [[Extensions.StringUtil|OTX StringUtil extension]] | [[StringUtil related terms]] | [[OutOfBoundsException]] | - }}
  
 
== OTL Syntax ==
 
== OTL Syntax ==
Line 11: Line 11:
 
'''ReplaceSubString''' term replaced the strings with ''replacement'' string, starting at the specified position (''index'') within a strings and returns the result.  
 
'''ReplaceSubString''' term replaced the strings with ''replacement'' string, starting at the specified position (''index'') within a strings and returns the result.  
  
{{TermReturnValue| [[String]] | The replacement string}}
+
{{TermReturnValue| [[Core.DataTypes.SimpleDataType.String|String]] | The replacement string}}
  
 
== 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| Replacement | [[String]] | [[Term]] | - | [1] | The string that replaces a portion of the original string starting at the specified position}}
+
{{TableRowPropertie2| Replacement | [[Core.DataTypes.SimpleDataType.String|String]] | [[Term]] | - | [1] | The string that replaces a portion of the original string starting at the specified position}}
{{TableRowPropertie1| Index | [[Iteger]] | [[Term]] | - | [1] | The zero-based position of the original string, from which starts the replacement}}
+
{{TableRowPropertie1| Index | [[Core.DataTypes.SimpleDataType.Integer|Integer]] | [[Term]] | - | [1] | The zero-based position of the original string, from which starts the replacement}}
 
|}
 
|}
  
Line 29: Line 29:
  
 
== See also ==
 
== See also ==
[[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/>
[[IndexOf]] <br/>
+
[[Extensions.StringUtil.IndexOf|IndexOf]] <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:35, 16 February 2016

Classification

Name ReplaceSubString
Short Description Replacing strings
Class Term
Extension OTX StringUtil extension
Group StringUtil related terms
Exceptions OutOfBoundsException
Checker Rules -
Standard Compliant Yes

OTL Syntax

StringTerm = ReplaceSubString(StringTerm, StringTerm, IntegerTerm);

Description

ReplaceSubString term replaced the strings with replacement string, starting at the specified position (index) within a strings and returns the result.

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
String The replacement string

Properties

Name Data Type Class Default Cardinality Description
String String Term - [1] The original string
Replacement String Term - [1] The string that replaces a portion of the original string starting at the specified position
Index Integer Term - [1] The zero-based position of the original string, from which starts the replacement

OTL Examples

String String1;

String1 = ReplaceSubString("emotive company", "COMPANY", 8);

See also

MatchToRegularExpression
StringConcatenate
SubString
LengthOfString
IndexOf
SplitString
ToUpper
ToLower
Encode
Decode