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

Encodes a string More...

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

Public Attributes

StringTerm _string
 Cardinality [1]
Represents the string which shall be transformed to a ByteField by using the given encoding. More...
 
EncodingTerm encoding
 Cardinality [1]
Encoding for the interpretation of the 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

Encodes a string

The Encode term encodes the given String corresponding to the specified encoding and returns the result as a ByteField.

Exceptions
Core.Exceptions.OutOfBoundsExceptionIt is thrown if the string cannot be encoded with the given encoding.


Syntax
ByteFieldTerm StringUtil.Encode(EncodingTerm encoding, StringTerm string);
EncodingTerm encoding
Cardinality [1] Encoding for the interpretation of the string.
Definition: StringUtil.cs:445
Examples
// Local Declarations
ByteField ByteField1;
// Flow
ByteField1 = StringUtil.Encode(@Encoding:US-ASCII, "FFFF");

Member Data Documentation

◆ _string

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

Cardinality [1]
Represents the string which shall be transformed to a ByteField by using the given encoding.

◆ encoding

EncodingTerm OpenTestSystem.Otx.Extensions.StringUtil.Terms.Encode.encoding

Cardinality [1]
Encoding for the interpretation of the string.