matchstr.c File Reference

a couple of string utilities More...

#include <stdio.h>
#include <assert.h>
#include <ctype.h>
#include <string.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:
a first buffer
b second buffer
len_a length of first buffer
Return values:
len_b length of second buffer
0 buffers are equal
>0 a > b
<0 a < 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:
a first second
b second string
b_del delimitor for b
Return values:
0 strings are similar
!=0 strings are different

Definition at line 51 of file matchstr.c.

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

Generated on Tue Aug 17 13:13:20 2010 for YAZ by  doxygen 1.6.3