Quanlse/Utils/Functions.py
def translateStrToInt(strN: str) -> int:
        """
        Translate a string to int.
        :param strN: input string
        :return: an int value
        """
        intNum = 0
        for digIndex, charN in enumerate(strN):
            dig = int(charN)
            if dig >= sysLevel:
                raise ArgumentError(f"Digit '{dig}' is greater than sysLevel '{sysLevel}'.")
            intNum += (sysLevel ** (digLen - digIndex - 1)) * dig
        return intNum

        Translate a string to int.
        :param strN: input string
        :return: an int value
        
Translate a string to int.
Translate a string to int .
def translateStrToInt(strN: str) -> int:
        intNum = 0
        for digIndex, charN in enumerate(strN):
            dig = int(charN)
            if dig >= sysLevel:
                raise ArgumentError(f"Digit '{dig}' is greater than sysLevel '{sysLevel}'.")
            intNum += (sysLevel ** (digLen - digIndex - 1)) * dig
        return intNum
def translateStrToInt ( strN : str ) -> int : intNum = 0 for digIndex , charN in enumerate ( strN ) : dig = int ( charN ) if dig >= sysLevel : raise ArgumentError ( f"Digit '{dig}' is greater than sysLevel '{sysLevel}'." ) intNum += ( sysLevel ** ( digLen - digIndex - 1 ) ) * dig return intNum
Translate a string to int.
Translate a string to int .
"""
        Translate a string to int.
        :param strN: input string
        :return: an int value
        """
an int value
an int value
strN
str
None