"Sputnik" help  
Sputnik Help
BinaryRead64BitCString(<binary>, <position>)

Description

Reads a 64-bit encoded C-style string from a binary array starting from the specified position.

Parameters

<binary> The binary array from which to read the string.
<position> The position in the binary array to start reading from.

Return Value

Success: Returns the 64-bit C-style string.
Failure: Returns null.

Remarks

The BinaryRead64BitCString function reads the 64-bit encoded characters from the binary array starting from the specified position until a null terminator (eight zero bytes) is encountered. It returns the resulting string.

Related

BinaryWrite64BitCString

Example

Example of usage:

my $a = BinNew(96);

BinaryWrite32BitCString($a, 0, "Cat");
BinaryWrite32BitCString($a, 32, "Dog");
BinaryWrite32BitCString($a, 64, "Fox");

say BinaryExpand($a, false);

say BinaryRead32BitCString($a, 0);
say BinaryRead32BitCString($a, 32);
say BinaryRead32BitCString($a, 64);

// PRINTS
// 43 00 00 00 61 00 00 00 74 00 00 00 00 00 00 00 C...a...t.......
// 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
// 44 00 00 00 6F 00 00 00 67 00 00 00 00 00 00 00 D...o...g.......
// 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
// 46 00 00 00 6F 00 00 00 78 00 00 00 00 00 00 00 F...o...x.......
// Cat
// Dog
// Fox

 


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