def str2bool(value):
    """Convert a string into boolean.

    .. code-block:: python

        pycof.str2bool(value)

    :Parameters:
        * **value** (:obj:`str`): Value to be converted to boolean.
    
    :Example:
        >>> pycof.str2bool('true')
        ... True
        >>> pycof.str2bool(1)
        ... True
        >>> pycof.str2bool(0)
        ... False

    :Returns:
        * :obj:`bool`: Returns either True or False.
    """
    return str(value).lower() in ('yes', 'y', 'true', 't', '1')
