Converts bool values to lowercase strings
348197
def _bool_encode(self, d):
        
        for k, v in d.items():
            if isinstance(v, bool):
                d[k] = str(v).lower()
        
        return d
1329357
def _parse_boolean(element_text, state):
    """"""
    value = None

    lowered_text = element_text.lower()
    if lowered_text == 'true':
        value = True
    elif lowered_text == 'false':
        value = False
    else:
        state.raise_error(InvalidPrimitiveValue, 'Invalid boolean value "{}"'.format(element_text))

    return value
383283
def normalize_value(val):
    
    
    if val is not None:
        if val.lower() == 'false':
            val = False
        elif val.lower() == 'true':
            val = True
    
    return val
1018374
def to_bool(value):
    
    if value is None:
        return None
    if isinstance(value, bool):
        return value
    elif isinstance(value, str):
        if value=="no":
            return False
        elif value=="yes":
            return True
942053
function stringCase(str, caseValue) {
		switch (String(caseValue || '').toLowerCase()) {
			case 'lower':
				return str.toLowerCase();
			case 'upper':
				return str.toUpperCase();
		}
		
		return str;
	}
831508
def asbool(s):
    
    if s is None:
        return False
    if isinstance(s, bool):
        return s
    s = str(s).strip()
    return s.lower() in truthy
1235615
def _parse_bool(self, value):
        """"""
        if isinstance(value, string_types):
            return value.strip().lower() in ['true', '1', 't', 'y', 'yes']
        return bool(value)
495759
private static Boolean stringToBoolean(String value) {
		final String s = blankToNull(value);
		return s == null ? null : Boolean.valueOf(s);
	}
78301
def convert_attrs_to_lowercase(obj: Any, attrs: Iterable[str]) -> None:
    
    for a in attrs:
        value = getattr(obj, a)
        if value is None:
            continue
        setattr(obj, a, value.lower())
1232687
def parse_bool(s, default=False):
    
    if s is None:
        return default
    return TRUTH.get(s.lower(), default)
1289031
def to_nullable_boolean(value):
        
        # Shortcuts
        if value == None:
            return None
        if type(value) == type(True):
            return value

        str_value = str(value).lower()
        # All true values
        if str_value in ['1', 'true', 't', 'yes', 'y']:
            return True
        # All false values
        if str_value in ['0', 'frue', 'f', 'no', 'n']:
            return False

        # Everything else:
        return None
571463
public static String lowerCase(String str) {
        if(isNullOrEmpty(str)) {
            return str;
        }
        return str.toLowerCase(LOCALE_ENGLISH);
    }
976536
def _parse_boolean(value):
    
    value = value.lower()
    if value in _true_strings:
        return True
    elif value in _false_strings:
        return False
    else:
        return None
1327237
def parse_bool(value):
    
    value = str(value).lower()
    if value in ('on', 'true', 'yes', '1'):
        return True
    if value in ('off', 'false', 'no', '0'):
        return False
29020
def bool_lookup(value)
      return 'yes' if %w(true yes yep).include? value.to_s.downcase
      return 'no' if %w(false no nope).include? value.to_s.downcase
      value
    end
816116
def parse_boolean(value):
    

    if value is None:
        return None

    if isinstance(value, bool):
        return value

    if isinstance(value, string_types):
        value = value.lower()
        if value == 'false':
            return False
        if value == 'true':
            return True

    raise ValueError("Could not convert value to boolean: {}".format(value))
35691
def to_bool(s):
    
    if isinstance(s, bool):
        return s
    elif s.lower() in ['true', '1']:
        return True
    elif s.lower() in ['false', '0']:
        return False
    else:
        raise ValueError("Can't cast '%s' to bool" % (s))