Difference between revisions of "Extensions.StringUtil.Encode"

From emotive
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]] | - }}
  
== Pseudo-Code Syntax ==
+
== OTL Syntax ==
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
ByteField Encode(String string, Encoding encoding);
+
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;
//Returns result = 46464646
+
result = Encode("FFFF", @Encoding:US-ASCII);
 
</syntaxhighlight>
 
</syntaxhighlight>
  

Revision as of 10:43, 10 February 2015

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.

Icons Note.png 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