Core Function BinaryEndsWith

From Sputnik Wiki
(Difference between revisions)
Jump to: navigation, search
(Created page with "<pre> BinaryEndsWith( <binary-array>, <binary-array2> ) </pre> === Description === Check if this binary variable ends with a specific sequence of bytes. === Parameters === ==...")
 
m (1 revision)
 
(One intermediate revision by one user not shown)

Latest revision as of 12:37, 14 June 2015

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