You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lokinet/libsarp/str.hpp

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