MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / StrEqualsIgnoreCase

Function StrEqualsIgnoreCase

src/string.cpp:323–327  ·  view source on GitHub ↗

* Compares two string( view)s for equality, while ignoring the case of the characters. * @param str1 The first string. * @param str2 The second string. * @return True iff both strings are equal, barring the case of the characters. */

Source from the content-addressed store, hash-verified

321 * @return True iff both strings are equal, barring the case of the characters.
322 */
323bool StrEqualsIgnoreCase(std::string_view str1, std::string_view str2)
324{
325 if (str1.size() != str2.size()) return false;
326 return StrCompareIgnoreCase(str1, str2) == 0;
327}
328
329/**
330 * Checks if a string is contained in another string, while ignoring the case of the characters.

Callers 15

SelectDriverImplMethod · 0.85
ConNetworkAuthorizedKeyFunction · 0.85
StringToContentTypeFunction · 0.85
ConContentFunction · 0.85
ConFontFunction · 0.85
ConListDirsFunction · 0.85
ConNewGRFProfileFunction · 0.85
ConDumpInfoFunction · 0.85
StrStartsWithIgnoreCaseFunction · 0.85
StrEndsWithIgnoreCaseFunction · 0.85
ParseCodeFunction · 0.85

Calls 2

StrCompareIgnoreCaseFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected