X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=include%2Fyaz%2Fmatchstr.h;h=bdc5386e34731b3ecc2ea8dad5f09c61fdfe7f4e;hp=df44f61b782cfef3fe804d8c068e523a1683e9b0;hb=e7c4df57d3838ac1c0c15569daec2d118f4abb2c;hpb=43a9d38d20c1b1bcd1a03b2445a501d27526bd35 diff --git a/include/yaz/matchstr.h b/include/yaz/matchstr.h index df44f61..bdc5386 100644 --- a/include/yaz/matchstr.h +++ b/include/yaz/matchstr.h @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2011 Index Data. + * Copyright (C) 1995-2013 Index Data. * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -65,8 +65,36 @@ YAZ_EXPORT int yaz_strcmp_del(const char *a, const char *b, const char *b_del); \retval >0 a > b \retval <0 a < b */ -int yaz_memcmp(const void *a, const void *b, size_t len_a, size_t len_b); +YAZ_EXPORT int yaz_memcmp(const void *a, const void *b, + size_t len_a, size_t len_b); +/** \brief ala strncasecmp - no locale + \param s1 first buffer + \param s2 second buffer + \param n number of bytes to compare + \retval 0 buffers are equal + \retval >0 a > b + \retval <0 a < b +*/ +YAZ_EXPORT int yaz_strncasecmp(const char *s1, const char *s2, size_t n); + +/** \brief ala strcasecmp - no locale + \param s1 first buffer + \param s2 second buffer + \retval 0 buffers are equal + \retval >0 a > b + \retval <0 a < b +*/ +YAZ_EXPORT int yaz_strcasecmp(const char *s1, const char *s2); + +/** \brief strcmp, null may be passed + \param s1 first buffer or NULL + \param s2 second buffer or NULL + \retval 0 buffers are equal + \retval >0 a > b + \retval <0 a < b +*/ +YAZ_EXPORT int yaz_strcmp_null(const char *s1, const char *s2); YAZ_END_CDECL