Core Function BinaryStripNull
From Sputnik Wiki
(Difference between revisions)
(→Remarks) |
m (1 revision) |
(One intermediate revision by one user not shown) |
Latest revision as of 12:37, 14 June 2015
BinaryStripNull( <binary-array> )
Contents |
Description
Strip all NULL bytes (0x00) from a binary variable.
Parameters
<binary-array>
The binary variable to use.
Return Value
Success: Returns amount of nulls removed.
Failure: Returns 0.
Remarks
If this binary variable had a text encoding stored it will now be wiped.
Example
$a = BinaryCreate(6); $a[0] = 'T'; $a[2] = 'A'; printr $a; BinaryStripNull($a); printr $a; # Prints # {BINARY:6} # { # [0] => 84 # [1] => 0 # [2] => 65 # [3] => 0 # [4] => 0 # [5] => 0 # } # {BINARY:2} # { # [0] => 84 # [1] => 65 # }