Shorten the version display on the main screen

This commit is contained in:
Henrik Rydgård
2024-10-22 11:58:50 +02:00
parent 26de955c77
commit a859b2223a
3 changed files with 25 additions and 2 deletions
+10
View File
@@ -100,6 +100,16 @@ bool containsNoCase(std::string_view haystack, std::string_view needle) {
return found != haystack.end();
}
int countChar(std::string_view haystack, char needle) {
int count = 0;
for (int i = 0; i < haystack.size(); i++) {
if (haystack[i] == needle) {
count++;
}
}
return count;
}
bool CharArrayFromFormatV(char* out, int outsize, const char* format, va_list args)
{
int writtenCount = vsnprintf(out, outsize, format, args);