"Sputnik" help  
Sputnik Help
BinCaseCmp(<binary1>, <binary2>, [<position1>], [<position2>], [<count1>], [<count2>])

Description

Performs a case-insensitive binary comparison between two binary strings, <binary1> and <binary2>, based on the specified positions and lengths. The BinCaseCmp function compares the specified portions of the binary strings without considering the case of the characters.

Parameters

<binary1> The first binary string to compare.
<binary2> The second binary string to compare.
<position1> Optional starting position in <binary1> for the comparison. If not specified, the comparison starts from the beginning of <binary1>.
<position2> Optional starting position in <binary2> for the comparison. If not specified, the comparison starts from the beginning of <binary2>.
<count1> Optional number of bytes to compare from <binary1>. If not specified, the comparison includes the entire <binary1>.
<count2> Optional number of bytes to compare from <binary2>. If not specified, the comparison includes the entire <binary2>.

Return Value

Success: Returns a zero integer (0).
Failure: Returns a negative or positive integer.

Remarks

The BinCaseCmp function performs a case-insensitive binary comparison between two binary strings. By specifying the positions and lengths, you can compare specific portions of the binary strings. If the optional parameters are not provided, the function performs the comparison on the entire binary strings.

Related

BinCmp, BinNCmp, BinNCaseCmp

Example

Example of usage:

say BinCmp(Bin("Hello"), Bin("Hello")); // true
say BinCmp(Bin("Hello"), Bin("HELLO")); // false
say BinCaseCmp(Bin("Hello"), Bin("HELLO")); // true
say BinNCmp(Bin("CatDog"), Bin("CatFox"), 3); // true
say BinNCmp(Bin("CatDog"), Bin("CATFox"), 3); // false
say BinNCaseCmp(Bin("CatDog"), Bin("CATFox"), 3); // true
// PRINTS
// 0
// 32
// 0
// 0
// 32
// 0

 


Contact
Cheryl (uberfox@hotmail.com)
Homepage
http://ubersoft.org