StringToHex (String function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (match syntax diagram to revised template; fix tags.)
m (Full stop)
Line 25: Line 25:
==See also==
==See also==
<ul><li>The inverse of <var>StringToHex</var> is [[HexToString (String function)|HexToString]].
<ul><li>The inverse of <var>StringToHex</var> is [[HexToString (String function)|HexToString]].
<li>For details of the <var>printtext</var> statement, please see <var>[[Intrinsic classes#printtext|printText]]</var></ul>
<li>For details of the <var>printtext</var> statement, please see <var>[[Intrinsic classes#printtext|printText]]</var>.</ul>
{{Template:String:StringToHex footer}}
{{Template:String:StringToHex footer}}

Revision as of 23:31, 3 February 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

  • The inverse of StringToHex is HexToString.
  • For details of the printtext statement, please see printText.