Difference between revisions of "Extensions.StringUtil.Encode"
Jump to navigation
Jump to search
(Created page with "Category:StringUtil == Classification == {{ClassificationActivity | Encode | Encodes a string | Term | OTX StringUtil extension | StringUtil related t...") |
|||
Line 3: | Line 3: | ||
{{ClassificationActivity | Encode | Encodes a string | [[Term]] | [[StringUtil|OTX StringUtil extension]] | [[StringUtil related terms]] | [[UnknownEncodingException]] <br/> [[OutOfBoundsException]] | - }} | {{ClassificationActivity | Encode | Encodes a string | [[Term]] | [[StringUtil|OTX StringUtil extension]] | [[StringUtil related terms]] | [[UnknownEncodingException]] <br/> [[OutOfBoundsException]] | - }} | ||
− | == | + | == OTL Syntax == |
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
− | + | ByteFieldTerm = Encode(StringTerm, EncodingType); | |
</syntaxhighlight> | </syntaxhighlight> | ||
Line 20: | Line 20: | ||
|} | |} | ||
− | == Examples == | + | == OTL Examples == |
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
− | ByteField result = Encode("FFFF", @Encoding:US-ASCII); | + | ByteField result; |
− | + | result = Encode("FFFF", @Encoding:US-ASCII); | |
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 10:43, 10 February 2015
Contents
Classification
Name | Encode |
Short Description | Encodes a string |
Class | Term |
Extension | OTX StringUtil extension |
Group | StringUtil related terms |
Exceptions | UnknownEncodingException 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