"Sputnik" help  
Sputnik Help
BinaryTrimLeft(<binary>, <trimBinary>

Description

Removes leading occurrences of the specified binary string from the given binary string. If the optional second parameter is not provided, the function trims the default whitespace characters (0x20, 0x09, 0x0D, 0x0A). The function returns the resulting trimmed binary string.

Parameters

<binary> The input binary string to be trimmed.
<trimBinary> Optional binary string to be trimmed. If not provided, it defaults to whitespace characters (0x20, 0x09, 0x0D, 0x0A).

Return Value

Success: Returns trimmed binary string.
Failure: Returns empty binary string.

Remarks

The BinaryTrimLeft function trims leading occurrences of the specified trim binary string from the input binary string. If no trim string is provided, the function trims the default whitespace characters (0x20, 0x09, 0x0D, 0x0A). This function is useful for removing unwanted prefixes or delimiters from binary data, allowing for cleaner and more concise representations. The resulting trimmed binary string is returned, enabling seamless integration into various data processing workflows.

Related

BinaryTrim, BinaryTrimStart, BinaryTrimEnd, BinaryTrimRight

Example

Trim Binary:

my $a = bin("      Hello      ");
my $b = BinaryTrimLeft($a);
say "\"$a\"";
say "\"$b\"";
// PRINTS
// "      Hello      "
// "Hello      "

 


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