StringToHex (String function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (printtext)
m (printtext)
Line 16: Line 16:
<ul><li>Hex (short for hexadecimal) encoding is usually used for debugging when there is a concern that non-displayable characters (including trailing blanks) might be present in a string. By hex encoding such a string, all non-displayable bytes are converted to displayable hexadecimal equivalents.
<ul><li>Hex (short for hexadecimal) encoding is usually used for debugging when there is a concern that non-displayable characters (including trailing blanks) might be present in a string. By hex encoding such a string, all non-displayable bytes are converted to displayable hexadecimal equivalents.
<li><var>StringToHex</var> always returns an even number of bytes.
<li><var>StringToHex</var> always returns an even number of bytes.
<li><var>StringToHex</var> is available as of <var class="product">[[Sirius Mods|"Sirius Mods"]]</var> Version 7.2.</ul>
<li><var>StringToHex</var> is available as of <var class="product">[[Sirius Mods|Sirius Mods]]</var> Version 7.2.</ul>


==Examples==
==Examples==

Revision as of 17:46, 4 May 2011

Convert an Ebcdic string to hexadecimal (String class)


The StringToHex intrinsic function returns the hex encoded value of the method object string.

Syntax

%outString = string:StringToHex

Syntax terms

%outString A string variable to receive the hex encoded value of the method object string.
string The string to be hex encoded.

Usage notes

  • Hex (short for hexadecimal) encoding is usually used for debugging when there is a concern that non-displayable characters (including trailing blanks) might be present in a string. By hex encoding such a string, all non-displayable bytes are converted to displayable hexadecimal equivalents.
  • StringToHex always returns an even number of bytes.
  • StringToHex is available as of Sirius Mods Version 7.2.

Examples

  1. The following statement displays D581A8A281A88599:

    printText {'Naysayer':stringToHex}

See also