library Lib_ErrorUtils {

    /**********************
     * Internal Functions *
     **********************/

    /**
     * Encodes an error string into raw solidity-style revert data.
     * (i.e. ascii bytes, prefixed with bytes4(keccak("Error(string))"))
     * Ref: https://docs.soliditylang.org/en/v0.8.2/control-structures.html?highlight=Error(string)
     * #panic-via-assert-and-error-via-require
     * @param _reason Reason for the reversion.
     * @return Standard solidity revert data for the given reason.
     */
    function encodeRevertString(
        string memory _reason
    )
        internal
        pure
        returns (
            bytes memory
        )
    {
        return abi.encodeWithSignature(
            "Error(string)",
            _reason
        );
    }
}
/**
 * @title Lib_ErrorUtils
 */
function encodeRevertString(
    string memory _reason
)
    internal
    pure
    returns (
        bytes memory
    )
{
    return abi.encodeWithSignature(
        "Error(string)",
        _reason
    );
}

/**
 * Encodes an error string into raw solidity-style revert data.
 * (i.e. ascii bytes, prefixed with bytes4(keccak("Error(string))"))
 * Ref: https://docs.soliditylang.org/en/v0.8.2/control-structures.html?highlight=Error(string)
 * #panic-via-assert-and-error-via-require
 * @param _reason Reason for the reversion.
 * @return Standard solidity revert data for the given reason.
 */