YAZ  4.2.57
Functions
matchstr.c File Reference

a couple of string utilities More...

#include <stdio.h>
#include <assert.h>
#include <string.h>
#include <yaz/yaz-iconv.h>
#include <yaz/matchstr.h>

Go to the source code of this file.

Functions

int yaz_matchstr (const char *s1, const char *s2)
 match strings - independent of case and '-'
int yaz_strcmp_del (const char *a, const char *b, const char *b_del)
 match a and b with some delimitor for b
int yaz_memcmp (const void *a, const void *b, size_t len_a, size_t len_b)
 compares two buffers of different size

Detailed Description

a couple of string utilities

Definition in file matchstr.c.

Function Documentation

int yaz_matchstr ( const char *  s1,
const char *  s2 
)
int yaz_memcmp ( const void *  a,
const void *  b,
size_t  len_a,
size_t  len_b 
)

compares two buffers of different size

Parameters
afirst buffer
bsecond buffer
len_alength of first buffer
Return values
len_blength of second buffer
0buffers are equal
>0a > b
<0a < b

Definition at line 65 of file matchstr.c.

Referenced by compare_attr().

int yaz_strcmp_del ( const char *  a,
const char *  b,
const char *  b_del 
)

match a and b with some delimitor for b

Parameters
afirst second
bsecond string
b_deldelimitor for b
Return values
0strings are similar
!=0strings are different

Definition at line 51 of file matchstr.c.

Referenced by yaz_sru_decode(), yaz_srw_check_content_type(), and yaz_srw_decode().