mirror of
https://github.com/neovim/neovim.git
synced 2025-10-06 09:56:31 +00:00
fix(runtime): respect 'fileignorecase' when sourcing (#24344)
This commit is contained in:
@@ -436,25 +436,6 @@ char *vim_strchr(const char *const string, const int c)
|
||||
}
|
||||
}
|
||||
|
||||
/// Test if "str" ends with "suffix"
|
||||
///
|
||||
/// @param[in] str
|
||||
/// @param[in] suffix to match
|
||||
///
|
||||
/// @return [allocated] Copy of the string.
|
||||
bool str_ends_with(const char *str, const char *suffix)
|
||||
{
|
||||
if (!str || !suffix) {
|
||||
return false;
|
||||
}
|
||||
size_t lenstr = strlen(str);
|
||||
size_t lensuffix = strlen(suffix);
|
||||
if (lensuffix > lenstr) {
|
||||
return false;
|
||||
}
|
||||
return strncmp(str + lenstr - lensuffix, suffix, lensuffix) == 0;
|
||||
}
|
||||
|
||||
// Sort an array of strings.
|
||||
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
|
Reference in New Issue
Block a user