X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=include%2Fyaz%2Fmatchstr.h;h=600cdaff5e73f0a226df9b858c3f7dbdb9108e1a;hp=b7769074b81eee38660a7d186a75a9b34339f733;hb=a79aad9d43494377709086e73ff7b66930bbdb38;hpb=ae309395bf5f5511c2eee751151a2962726f745a diff --git a/include/yaz/matchstr.h b/include/yaz/matchstr.h index b776907..600cdaf 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-2008 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: @@ -26,7 +26,7 @@ */ /** - * \file match-str.h + * \file matchstr.h * \brief Header for YAZ iconv interface */ @@ -65,7 +65,27 @@ 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); YAZ_END_CDECL @@ -74,6 +94,7 @@ YAZ_END_CDECL /* * Local variables: * c-basic-offset: 4 + * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab