Difference between revisions of "Extensions.StringUtil.Decode"

From emotive
Jump to navigation Jump to search
(Created page with "Category:StringUtil == Classification == {{ClassificationActivity | Decode | Decodes a string | Term | OTX StringUtil extension | StringUtil related t...")
 
Line 3: Line 3:
 
{{ClassificationActivity | Decode | Decodes a string | [[Term]] | [[StringUtil|OTX StringUtil extension]] | [[StringUtil related terms]] | [[UnknownEncodingException]] <br/> [[OutOfBoundsException]] | - }}
 
{{ClassificationActivity | Decode | Decodes a string | [[Term]] | [[StringUtil|OTX StringUtil extension]] | [[StringUtil related terms]] | [[UnknownEncodingException]] <br/> [[OutOfBoundsException]] | - }}
  
== Pseudo-Code Syntax ==
+
== OTL Syntax ==
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
ByteField Decode(ByteField byteField, Encoding encoding);
+
StringTerm = Decode(ByteFieldTerm, 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 = Decode(&46464646, @Encoding:US-ASCII);
+
String result;
//Returns result = "FFFF"
+
result = Decode(&46464646, @Encoding:US-ASCII);
 
</syntaxhighlight>
 
</syntaxhighlight>
  

Revision as of 10:44, 10 February 2015

Classification

Name Decode
Short Description Decodes a string
Class Term
Extension OTX StringUtil extension
Group StringUtil related terms
Exceptions UnknownEncodingException
OutOfBoundsException
Checker Rules -
Standard Compliant Yes

OTL Syntax

StringTerm = Decode(ByteFieldTerm, EncodingType);

Description

The Decode term decodes the specified ByteField corresponding to the specified encoding and returns a String as a 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 Decoded string according to the given encoding.

Properties

Name Data Type Class Default Cardinality Description
ByteField ByteField Term - [1] Bytefield is converted according to the encoding in the string
Encoding Encoding Value @Encoding:US-ASCII [1] Encoding is applied to the string

OTL Examples

String result;
result = Decode(&46464646, @Encoding:US-ASCII);

See also

ReplaceSubString
MatchToRegularExpression
StringConcatenate
SubString
LengthOfString
IndexOf
SplitString
ToUpper
ToLower
Encode