Core Function BinaryEndsWith

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

Contents

Description

Check if this binary variable ends with a specific sequence of bytes.

Parameters

binary-array

The binary variable to check.

binary-array2

The binary variable to compare with.

Return Value

Success: Returns true.

Failure: Returns false.

Remarks

The comparison is case-sensitive.

The bytes are read as ASCII only.

Example

my $bin1 = Pack("A*", "Hello world!");
my $bin2 = Pack("A*", "world!");
 
if(BinaryEndsWith($bin1, $bin2))
{
	say "True";
}
else
{
	say "False";
}
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox