YAZ 5.37.0
match_glob.c File Reference

Glob expression match. More...

#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <yaz/xmalloc.h>
#include <yaz/wrbuf.h>
#include <yaz/match_glob.h>

Go to the source code of this file.

Functions

int yaz_match_glob (const char *glob, const char *text)
 matches a glob expression against text
int yaz_match_glob2 (const char *glob, const char *text, int case_insensitive)
 matches a glob expression against text

Detailed Description

Glob expression match.

Definition in file match_glob.c.

Function Documentation

◆ yaz_match_glob()

int yaz_match_glob ( const char * glob,
const char * text )

matches a glob expression against text

Parameters
globglob expression
textthe text
Return values
0no match
1match

Operators: c (literal char), ? (any char), (any number of any char) (zero or more)

Definition at line 22 of file match_glob.c.

References yaz_match_glob2().

Referenced by glob_r(), and z_soap_codec_enc_xsl().

◆ yaz_match_glob2()

int yaz_match_glob2 ( const char * glob,
const char * text,
int case_insensitive )

matches a glob expression against text

Parameters
globglob expression
textthe text
case_insensitive1=case does not matter; 0=case matters
Return values
0no match
1match

Operators: c (literal char), ? (any char), (any number of any char) (zero or more)

Definition at line 27 of file match_glob.c.

References yaz_match_glob2().

Referenced by yaz_match_glob(), yaz_match_glob2(), and yaz_retrieval_request().