def str_to_bool(s):
    """Transform a string to boolean.

    :param s: the value to transform as boolean
    :type s: str
    :return: the given is as bool
    :rtype: boolean
    """
    if s == 'false':
        return False
    if s == 'true':
        return True
    raise Exception('Unable to cast as bool %s' % s)