#include <libxml/parser.h>
#include <system_info.h>
+#include <system_settings.h>
+
char *setting_file_basename(char *path)
{
if (NULL == path || '\0' == path[0]) {
return FALSE;
}
+//NULL, "", " ", " " etc.. are all empty strings
bool isEmptyStr(const char *str)
{
- if (NULL == str || str[0] == '\0') {
- return TRUE;
- } else {
- return FALSE;
+ //if (NULL == str)
+ // return TRUE;
+ while (str)
+ {
+ if (*str != '\0' && *str != ' ')
+ {
+ return FALSE;
+ }
+ else if (*str == '\0')
+ {
+ return TRUE;
+ }
+ str++;
}
+ return TRUE;
}
+
int safeStrCmp(const char *s1, const char *s2)
{
/* Check NULL value first */