mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-26 21:36:26 +00:00
Create string_is_empty
This commit is contained in:
parent
85c48f0c3d
commit
d880ffab5b
@ -31,6 +31,8 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
bool string_is_empty(const char *data);
|
||||
|
||||
char *string_replace_substring(const char *in, const char *pattern,
|
||||
const char *by);
|
||||
|
||||
|
@ -22,6 +22,19 @@
|
||||
|
||||
#include <string/stdstring.h>
|
||||
|
||||
bool string_is_empty(const char *data)
|
||||
{
|
||||
char **str = NULL;
|
||||
|
||||
if (!data)
|
||||
return true;
|
||||
|
||||
str = (char**)&data;
|
||||
if (**str == '\0')
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
char *string_replace_substring(const char *in, const char *pattern, const char *replacement)
|
||||
{
|
||||
char *needle = NULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user