Converts a binary string to its decimal equivalent.
Parameters
binary: string
The binary string to convert.
Returns number
The decimal value.
Remarks
This function assumes that the input binary string is valid (contains only '0' and '1').
If an invalid binary string is provided, the result may be unexpected.
Converts a binary string to its decimal equivalent.