/*
 * Copyright (C) 2023-2025 Hasl Developers
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, see <https://www.gnu.org/licenses/>.
 */

#ifndef HASL_STRING_H
#define HASL_STRING_H

#include <glib.h>

#include "haslversion.h"

G_BEGIN_DECLS

/**
 * hasl_str_is_empty:
 * @str: (nullable): the string to check
 *
 * Determines if @str is empty or not.
 *
 * Returns: true if @str is empty; false otherwise.
 *
 * Since: 0.5
 */
HASL_AVAILABLE_STATIC_INLINE_IN_0_5
static inline gboolean
hasl_str_is_empty(const char *str) {
	return (str == NULL || str[0] == '\0');
}

G_END_DECLS

#endif /* HASL_STRING_H */
