howlongtobeatpy/howlongtobeatpy/HTMLResultParser.py
def convert_time_to_number(time_string: str):
        """
        Function that return the number part from the string
        @param time_string: The original string with the time (ex. 50 Hours)
        @return: the numeric part of that time (ex. 50 or 51 (and half) , IS A STRING)
        """
        if "-" in time_string:
            return -1
        end_pos = time_string.find(' ')
        return time_string[:end_pos].strip()

        Function that return the number part from the string
        @param time_string: The original string with the time (ex. 50 Hours)
        @return: the numeric part of that time (ex. 50 or 51 (and half) , IS A STRING)
        
Function that return the number part from the string
Function that return the number part from the string
def convert_time_to_number(time_string: str):
        if "-" in time_string:
            return -1
        end_pos = time_string.find(' ')
        return time_string[:end_pos].strip()
def convert_time_to_number ( time_string : str ) : if "-" in time_string : return - 1 end_pos = time_string . find ( ' ' ) return time_string [ : end_pos ] . strip ( )
Function that return the number part from the string
Function that return the number part from the string
"""
        Function that return the number part from the string
        @param time_string: The original string with the time (ex. 50 Hours)
        @return: the numeric part of that time (ex. 50 or 51 (and half) , IS A STRING)
        """
the numeric part of that time (ex. 50 or 51 (and half) , IS A STRING)
the numeric part of that time ( ex . 50 or 51 ( and half ) IS A STRING )
time_string
str
The original string with the time (ex.
The original string with the time ( ex .