TODO: Support case-insensitive models
211
public DataType resolveProperty(DataType sourceType, String identifier, boolean mustResolve) {
        DataType currentType = sourceType;
        while (currentType != null) {
            if (currentType instanceof ClassType) {
                ClassType classType = (ClassType)currentType;
                for (ClassTypeElement e : classType.getElements()) {
                    if (e.getName().equals(identifier)) {
                        if (e.isProhibited()) {
                            throw new IllegalArgumentException(String.format("Element %s cannot be referenced because it is marked prohibited in type %s.", e.getName(), ((ClassType) currentType).getName()));
                        }

                        return e.getType();
                    }
                }
            }
            else if (currentType instanceof TupleType) {
                TupleType tupleType = (TupleType)currentType;
                for (TupleTypeElement e : tupleType.getElements()) {
                    if (e.getName().equals(identifier)) {
                        return e.getType();
                    }
                }
            }
            else if (currentType instanceof IntervalType) {
                IntervalType intervalType = (IntervalType)currentType;
                switch (identifier) {
                    case "low":
                    case "high":
                        return intervalType.getPointType();
                    case "lowClosed":
                    case "highClosed":
                        return resolveTypeName("System", "Boolean");
                    default:
                        // ERROR:
                        throw new IllegalArgumentException(String.format("Invalid interval property name %s.", identifier));
                }
            }
            else if (currentType instanceof ChoiceType) {
                ChoiceType choiceType = (ChoiceType)currentType;
                // TODO: Issue a warning if the property does not resolve against every type in the choice

                // Resolve the property against each type in the choice
                Set<DataType> resultTypes = new HashSet<>();
                for (DataType choice : choiceType.getTypes()) {
                    DataType resultType = resolveProperty(choice, identifier, false);
                    if (resultType != null) {
                        resultTypes.add(resultType);
                    }
                }

                // The result type is a choice of all the resolved types
                if (resultTypes.size() > 1) {
                    return new ChoiceType(resultTypes);
                }

                if (resultTypes.size() == 1) {
                    for (DataType resultType : resultTypes) {
                        return resultType;
                    }
                }
            }
            else if (currentType instanceof ListType && listTraversal) {
                // NOTE: FHIRPath path traversal support
                // Resolve property as a list of items of property of the element type
                ListType listType = (ListType)currentType;
                DataType resultType = resolveProperty(listType.getElementType(), identifier);
                return new ListType(resultType);

            }

            if (currentType.getBaseType() != null) {
                currentType = currentType.getBaseType();
            }
            else {
                break;
            }
        }

        if (mustResolve) {
            // ERROR:
            throw new IllegalArgumentException(String.format("Member %s not found for type %s.", identifier, sourceType != null ? sourceType.toLabel() : null));
        }

        return null;
    }
500172
def _regex_span(_regex, _str, case_insensitive=True):
    
    if case_insensitive:
        flags = regex.IGNORECASE | regex.FULLCASE | regex.VERSION1
    else:
        flags = regex.VERSION1
    comp = regex.compile(_regex, flags=flags)
    matches = comp.finditer(_str)
    for match in matches:
        yield match
492215
function matchKey(needle, obj, caseInsensitive) {
	needle = (caseInsensitive) ? needle.toLowerCase() : needle;
	for (let key in obj) {
		let keyCopy = (caseInsensitive) ? key.toLowerCase() : key;

		if (keyCopy === needle) {
			//return the original
			return key;
		}
	}

	return null;
}
1144821
def case_sensitive(self, lst):
        
        dictionary = {}
        for pkg in lst:
            dictionary[pkg.lower()] = pkg
        return dictionary
834925
def upcaseTokens(s,l,t):
    """"""
    return [ tt.upper() for tt in map(_ustr,t) ]
8823
String applyCaseInsensitivity(String name) {
        return (name != null)
                ? isCaseSensitiveTableNames() ? name : isCaseInsensitiveStrategyLowerCase()
                        ? name.toLowerCase(Locale.ENGLISH)
                        : name.toUpperCase(Locale.ENGLISH)
                : null;
    }
1155972
function replaceInsensitive(chr, dbl) {

		var lower = chr.toLowerCase(),
		    upper = chr.toUpperCase(),
		    result,
		    dbl_result;

		if (lower == upper) {
			return chr;
		}

		result = '[' + lower + upper;

		result += (baseDiacriticsMap[lower]||'');
		result += (baseDiacriticsMap[upper]||'');

		result += ']';

		if (dbl) {
			lower = dbl.toLowerCase();
			upper = dbl.toUpperCase();

			dbl_result = baseDiacriticsMap[lower] || '';
			dbl_result += baseDiacriticsMap[upper] || '';

			if (dbl_result) {
				// Make the previous group optional,
				// but do require one of these groups then
				result = '?(?:' + result + '|[' + dbl_result + '])';
			}
		}

		return result;
	}
3486
public static Parser<Void> stringCaseInsensitive(String str) {
    return Patterns.stringCaseInsensitive(str).toScanner(str);
  }
984235
function(type, pattern, data) {
		if (type == 'tag') { // case-insensitive match on tag name
			return pattern && pattern.toLowerCase() == data.toLowerCase();
		} else {
			return pattern === data;
		}
	}
942053
function stringCase(str, caseValue) {
		switch (String(caseValue || '').toLowerCase()) {
			case 'lower':
				return str.toLowerCase();
			case 'upper':
				return str.toUpperCase();
		}
		
		return str;
	}
658997
String convertCase(String str) {
        if (str == null) {
            return null;
        }
        return sensitive ? str : str.toLowerCase();
    }
1023437
def convert_case(name):
        """"""
        s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name)
        return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower()
547947
private MemberModel tryFindMemberModelByC2jName(String memberC2jName, boolean ignoreCase) {

        final List<MemberModel> memberModels = getMembers();
        final String expectedName = ignoreCase ? StringUtils.lowerCase(memberC2jName)
                                                : memberC2jName;

        if (memberModels != null) {
            for (MemberModel member : memberModels) {
                String actualName = ignoreCase ? StringUtils.lowerCase(member.getC2jName())
                                                : member.getC2jName();

                if (expectedName.equals(actualName)) {
                    return member;
                }
            }
        }
        return null;
    }
371010
def can_perform_case_insensitive_comparison_for?(column)
      @case_insensitive_cache ||= {}
      @case_insensitive_cache[column.sql_type] ||= begin
        sql = <<~SQL
          SELECT exists(
            SELECT * FROM pg_proc
            WHERE proname = 'lower'
              AND proargtypes = ARRAY[#{quote column.sql_type}::regtype]::oidvector
          ) OR exists(
            SELECT * FROM pg_proc
            INNER JOIN pg_cast
              ON ARRAY[casttarget]::oidvector = proargtypes
            WHERE proname = 'lower'
              AND castsource = #{quote column.sql_type}::regtype
          )
        SQL
        select_value(sql, 'SCHEMA')
      end
    end
1092431
def _keys_to_lower(self):
        """"""
        for k in list(self.keys()):
            val = super(CaseInsensitiveDict, self).__getitem__(k)
            super(CaseInsensitiveDict, self).__delitem__(k)
            self.__setitem__(CaseInsensitiveStr(k), val)
950009
function UMLPrimitiveTypeView() {
        UMLClassifierView.apply(this, arguments);
        this.fillColor = PreferenceManager.get("uml.datatype.fillColor", "#ffffff") || PreferenceManager.get("view.fillColor", "#ffffff");
        this.suppressAttributes = true;
        this.suppressOperations = true;
    }
766270
private static Map<String, String> filterNamespacesToPresent(final Model model,
            final Map<String, String> nsPrefixes) {
        final Map<String, String> resultNses = new HashMap<>();
        final Set<Entry<String, String>> nsSet = nsPrefixes.entrySet();
        final NsIterator nsIt = model.listNameSpaces();
        while (nsIt.hasNext()) {
            final String ns = nsIt.next();

            final Optional<Entry<String, String>> nsOpt = nsSet.stream()
                    .filter(nsEntry -> nsEntry.getValue().equals(ns))
                    .findFirst();
            if (nsOpt.isPresent()) {
                final Entry<String, String> nsMatch = nsOpt.get();
                resultNses.put(nsMatch.getKey(), nsMatch.getValue());
            }
        }

        return resultNses;
    }