:py:mod:`sovabids.misc` ======================= .. py:module:: sovabids.misc .. autoapi-nested-parse:: Module with misc utilities for sovabids. Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: sovabids.misc.flat_paren_counter sovabids.misc.get_num_digits .. py:function:: flat_paren_counter(string) Count the number of non-nested balanced parentheses in the string. If parenthesis is not balanced then return -1. :param string: The string we will inspect for balanced parentheses. :type string: str :returns: The number of non-nested balanced parentheses or -1 if the string has unbalanced parentheses. :rtype: int .. py:function:: get_num_digits(N) Return the number of digits of the given number N. :param N: The number we want to apply the function to. :type N: int :returns: The numbers of digits needed to represent the number N. :rtype: int