Correctly handle zfs pools

#413
This commit is contained in:
Linus Dierheimer
2023-02-01 15:56:25 +01:00
parent 619ec921ee
commit a063cd4feb
22 changed files with 74 additions and 19 deletions
+29
View File
@@ -0,0 +1,29 @@
#include "stringUtils.h"
#include <string.h>
#include <ctype.h>
bool ffStrSet(const char* str)
{
if(str == NULL)
return false;
while(isspace(*str))
str++;
return *str != '\0';
}
bool ffStrHasNChars(const char* str, char c, uint32_t n)
{
for(uint32_t i = 0; i < n; i++)
{
char* current = strchr(str, c);
if(current == NULL)
return false;
str = current + 1;
}
return true;
}