mirror of
https://github.com/labwc/labwc.git
synced 2025-11-30 06:59:52 -05:00
string-helpers: add str_equal()
This commit is contained in:
parent
45f73b58a1
commit
5e29f79258
3 changed files with 15 additions and 5 deletions
|
|
@ -200,3 +200,8 @@ str_starts_with(const char *s, char needle, const char *ignore_chars)
|
|||
return (s + strspn(s, ignore_chars))[0] == needle;
|
||||
}
|
||||
|
||||
bool
|
||||
str_equal(const char *a, const char *b)
|
||||
{
|
||||
return a == b || (a && b && !strcmp(a, b));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue