added Arch post install script, and some general updates

This commit is contained in:
2025-06-20 19:17:41 +02:00
parent 25c0dd16ca
commit b04ea81edb
7 changed files with 146 additions and 15 deletions

View File

@@ -30,3 +30,14 @@ bool endsWith(const char * str, const char ch) {
if (str[len-1] != ch) return false; // Fail if str[len-1] != ch
return true; // str[len-1] == ch
}
bool startsWith(const char * str, const char ch[]) {
if (str == nullptr) return false; // Fail if str is null
if (ch == nullptr) return false; // Fail if ch is null
const size_t len = strlen(ch);
if (len == 0) return false; // Fail if str is empty
for (int i = 0; i < len; i++) {
if (str[i] != ch[i]) return false; // Found ch in str
}
return true; // ch is not in str
}