def str2bool(stringToConvert):
    """Convert a string to a boolean.
    
    Args:
        * *stringToConvert* (str): The following string values are accepted as ``True``: "true", "t", "yes", "y", "on", "1". The following string values are accepted as ``False``: "false", "f", "no", "n", "off", "0". Input string evaluation is always case insensitive.
       
    Returns:
        ``True`` or ``False``, depending on input value.
        
    Raises:
        :exc:`TypeError<python:exceptions.TypeError>`: If input string is not one of the accepted values.
    
    """
    if stringToConvert.lower() in ("true", "t", "yes", "y", "on", "1"): return True
    if stringToConvert.lower() in ("false", "f", "no", "n", "off", "0"): return False
    raise TypeError("The value '%s' is not considered a valid boolean in this context." % stringToConvert)