Extensions.StringUtil.Encode
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 = Encode(StringTerm, EncodingType);
Description
The Encode term encodes the specified string corresponding to the specified encoding and returns a ByteField as a result.
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 |
String | String | Term | - | [1] | The original string |
Encoding | Encoding | Value | @Encoding:US-ASCII | [1] | Encoding is applied to the string |
OTL Examples
ByteField result;
result = Encode("FFFF", @Encoding:US-ASCII);
See also
ReplaceSubString
MatchToRegularExpression
StringConcatenate
SubString
LengthOfString
IndexOf
SplitString
ToUpper
ToLower
Decode