X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=ucw%2Fstring.c;h=bb1fae1af01510e163f96dd630627ec5d1f08125;hb=a460dfb2377bfb1ade0f63e7493ab46c36b8fed7;hp=d6dc7bd5188524f0698e9820217b100da19a7b1e;hpb=fbb55a372fba2d0bc10d829d6829440d51e21e77;p=libucw.git diff --git a/ucw/string.c b/ucw/string.c index d6dc7bd5..bb1fae1a 100644 --- a/ucw/string.c +++ b/ucw/string.c @@ -10,10 +10,8 @@ #undef LOCAL_DEBUG -#include "ucw/lib.h" -#include "ucw/string.h" - -#include +#include +#include #ifdef CONFIG_DARWIN uns @@ -51,23 +49,3 @@ str_count_char(const char *str, uns chr) i++; return i; } - -int -str_starts_with(const char *haystack, const char *needle) -{ - while (*needle) - if (*haystack++ != *needle++) - return 0; - return 1; -} - -int -str_ends_with(const char *haystack, const char *needle) -{ - int hlen = strlen(haystack); - int nlen = strlen(needle); - if (hlen < nlen) - return 0; - else - return !memcmp(haystack + hlen - nlen, needle, nlen); -}