def str_to_bool(s, **kwargs):
    """
        from xdict.utils import *
        str_to_bool('False')
        str_to_bool('false')
        str_to_bool('True')
        str_to_bool('true')
    """
    if 'strict' in kwargs:
        strict = kwargs['strict']
    else:
        strict = 0
    if strict:
        if s == 'False':
            return False
        elif s == 'True':
            return True
        else:
            return None
    elif (s == 'False') | (s == 'false'):
        return False
    elif (s == 'True') | (s == 'true'):
        return True
    else:
        return None
