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 | |
a couple of string utilities
Definition in file matchstr.c.
| int yaz_matchstr | ( | const char * | s1, | |
| const char * | s2 | |||
| ) |
match strings - independent of case and '-'
| s1 | first string | |
| s2 | second string (May include wildcard ? and .) |
| 0 | strings are similar | |
| !=0 | strings are different |
Definition at line 21 of file matchstr.c.
Referenced by get_form(), get_sru_mode_from_string(), my_search(), yaz_advancegreek_decoder(), yaz_advancegreek_encoder(), yaz_danmarc_decoder(), yaz_init_opt_encode(), yaz_iso5426_decoder(), yaz_iso_5428_decoder(), yaz_iso_5428_encoder(), yaz_iso_8859_1_decoder(), yaz_iso_8859_1_encoder(), yaz_marc8_decoder(), yaz_marc8_encoder(), yaz_srw_str_to_pack(), yaz_string_to_oid(), yaz_ucs4_decoder(), yaz_ucs4_encoder(), yaz_utf8_decoder(), yaz_utf8_encoder(), yaz_wchar_decoder(), yaz_wchar_encoder(), z_HTTP_header_lookup(), and ztest_scan().
| int yaz_memcmp | ( | const void * | a, | |
| const void * | b, | |||
| size_t | len_a, | |||
| size_t | len_b | |||
| ) |
compares two buffers of different size
| a | first buffer | |
| b | second buffer | |
| len_a | length of first buffer |
| 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
| a | first second | |
| b | second string | |
| b_del | delimitor for b |
| 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().
1.6.3