Global: improve support of --help *-format

Also fix some bugs found when refactoring
This commit is contained in:
李通洲 committed 2023-10-07 13:40:40 +08:00
1 parent 23d2cc3fdc
commit 12208b2c7c
113 files changed
+746 -557

No files matched your search

+9
View File
@@ -34,6 +34,15 @@ static inline bool ffStrEndsWith(const char* str, const char* compareTo)
return memcmp(str + strLength - compareToLength, compareTo, compareToLength) == 0;
}
static inline bool ffStrEndsWithIgnCase(const char* str, const char* compareTo)
{
size_t strLength = strlen(str);
size_t compareToLength = strlen(compareTo);
if (strLength < compareToLength)
return false;
return strncasecmp(str + strLength - compareToLength, compareTo, compareToLength) == 0;
}
static inline bool ffStrEquals(const char* str, const char* compareTo)
{
return strcmp(str, compareTo) == 0;