lokinet/llarp/str.hpp

23 lines
339 B
C++
Raw Normal View History

2018-01-25 16:24:33 +00:00
#ifndef LIBLLARP_STR_HPP
#define LIBLLARP_STR_HPP
2018-01-19 16:51:27 +00:00
#include <cstring>
namespace llarp
{
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;
}
2018-01-26 14:17:51 +00:00
2018-02-01 13:21:00 +00:00
} // namespace llarp
2018-01-19 16:51:27 +00:00
#endif