Difference between revisions of "Extensions.StringUtil.Encode"
Jump to navigation
Jump to search
(One intermediate revision by one other user not shown) | |||
Line 5: | Line 5: | ||
== OTL Syntax == | == OTL Syntax == | ||
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
− | + | ByteFieldTerm StringUtil.Encode(EncodingTerm encoding, StringTerm string); | |
− | |||
− | |||
− | |||
</syntaxhighlight> | </syntaxhighlight> | ||
== Description == | == Description == | ||
− | The '''Encode''' term | + | The '''Encode''' term will encode a '''String''' by using a given encoding. The result is a '''ByteField''' representing the encoded string. |
{{TermReturnValue| [[Core.DataTypes.ComplexDataType.ByteField|ByteField]] | Encoded string according to the given encoding.}} | {{TermReturnValue| [[Core.DataTypes.ComplexDataType.ByteField|ByteField]] | Encoded string according to the given encoding.}} | ||
Line 19: | Line 16: | ||
{| {{TableHeader}} | {| {{TableHeader}} | ||
{{TableRowPropertiesHeader}} | {{TableRowPropertiesHeader}} | ||
− | {{TableRowPropertie1| Encoding | [[Extensions.StringUtil.Encoding|Encoding]] | [[Term]] | @Encoding:US-ASCII | [1] | This represents the encoding to be used. The set of standard encodings which | + | {{TableRowPropertie1| Encoding | [[Extensions.StringUtil.Encoding|Encoding]] | [[Term]] | @Encoding:US-ASCII | [1] | This represents the encoding to be used. The set of standard encodings which will be supported by any runtime system is given by the '''Encoding''' enumeration.}} |
− | {{TableRowPropertie2| String | [[Core.DataTypes.SimpleDataType.String|String]] | [[Term]] | - | [1] | Represents the string which | + | {{TableRowPropertie2| String | [[Core.DataTypes.SimpleDataType.String|String]] | [[Term]] | - | [1] | Represents the string which will be transformed to a '''ByteField''' by using the given encoding.}} |
|} | |} | ||
Latest revision as of 03:19, 13 September 2019
Contents
Classification
Name | Encode |
Short Description | Encodes a string |
Class | Term |
Extension | OTX StringUtil extension |
Group | StringUtil related terms |
Exceptions | UnsupportedEncodingException OutOfBoundsException |
Checker Rules | - |
Standard Compliant | Yes |
OTL Syntax
ByteFieldTerm StringUtil.Encode(EncodingTerm encoding, StringTerm string);
Description
The Encode term will encode a String by using a given encoding. The result is a ByteField representing the encoded string.
Return Value
The Term returns the value, see table below.
![]()
In OTX, Terms are categorized according to its return data type!
Data Type | Description |
ByteField | Encoded string according to the given encoding. |
Properties
Name | Data Type | Class | Default | Cardinality | Description |
Encoding | Encoding | Term | @Encoding:US-ASCII | [1] | This represents the encoding to be used. The set of standard encodings which will be supported by any runtime system is given by the Encoding enumeration. |
String | String | Term | - | [1] | Represents the string which will be transformed to a ByteField by using the given encoding. |
OTL Examples
/// Local Declarations
ByteField ByteField1;
/// Flow
ByteField1 = StringUtil.Encode(@Encoding:US-ASCII, "FFFF");
See also
ReplaceSubString
MatchToRegularExpression
StringConcatenate
SubString
LengthOfString
IndexOf
SplitString
ToUpper
ToLower
Decode