Core Function BinaryStr
From Sputnik Wiki
(Difference between revisions)
UberFoX (Talk | contribs)
(Created page with "<pre> BinaryStr( <binary-array>, <separator> ) </pre> === Description === Create a Hex string from a binary array. === Parameters === ==== binary-array ==== Any valid numer...")
Newer edit →
(Created page with "<pre> BinaryStr( <binary-array>, <separator> ) </pre> === Description === Create a Hex string from a binary array. === Parameters === ==== binary-array ==== Any valid numer...")
Newer edit →
Revision as of 00:24, 12 November 2011
BinaryStr( <binary-array>, <separator> )
Contents |
Description
Create a Hex string from a binary array.
Parameters
binary-array
Any valid numeric expression.
separator
A string to place between each element default is a single space.
Return Value
Success: Returns an hex string.
Failure: Returns empty string.
Remarks
A string has a value of zero.
Example
$binary = Pack("z0", "Hello World!") println( "Binary HEX: '" . BinaryStr($binary) . "'" )
Now with , for separation
$binary = Pack("z0", "Hello World!") println( "Binary HEX: '" . BinaryStr($binary, ",") . "'" )