Core Function BinaryPop

From Sputnik Wiki
Jump to: navigation, search
BinaryPop( <binary-array> ) 

Contents

Description

Delete the last byte from a binary variable.

Parameters

binary-array

The binary variable to use.

Return Value

Success: Returns 1.

Failure: Returns 0.

Remarks

Binary data is not really meant to be resized like crazy, so if you have a LOT of data, it is best to avoid using this too often.

Example

$binary = Pack("A*", "1234");
println( "'" . Unpack("A*", $binary, 3) . "'" ); // Prints: 1234
BinaryPop($binary);
println( "'" . Unpack("A*", $binary, 3) . "'" ); // Prints: 123
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox