mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-07 15:20:31 +00:00
21 lines
316 B
C++
21 lines
316 B
C++
#ifndef LIBSARP_STR_HPP
|
|
#define LIBSARP_STR_HPP
|
|
#include <cstring>
|
|
|
|
namespace sarp
|
|
{
|
|
static bool streq(const char * s1, const char * s2)
|
|
{
|
|
size_t sz1 = strlen(s1);
|
|
size_t sz2 = strlen(s2);
|
|
if (sz1 == sz2)
|
|
{
|
|
return strncmp(s1, s2, sz1) == 0;
|
|
}
|
|
else
|
|
return false;
|
|
}
|
|
}
|
|
|
|
#endif
|