Core Function BinaryStr

From Sputnik Wiki
(Difference between revisions)
Jump to: navigation, search
(Created page with "<pre> BinaryStr( <binary-array>, <separator> ) </pre> === Description === Create a Hex string from a binary array. === Parameters === ==== binary-array ==== Any valid numer...")
 
(binary-array)
Line 11: Line 11:
 
==== binary-array ====
 
==== binary-array ====
  
Any valid numeric expression.
+
A variable containing a binary array.
  
 
==== separator ====
 
==== separator ====

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

A variable containing a binary array.

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, ",") . "'" )
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox