mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 02:42:09 +02:00
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user