Documentation

WildcardMatch
in package

Table of Contents

Constants

REPLACEMENT_SET  = ["\x1c", '[*]', '.*', '[?]', '.', '~']
SEARCH_SET  = [ '~~', // convert double tilde to unprintable value '~\*', // convert tilde backslash asterisk to [*] (matches literal asterisk in regexp) '\*', // convert backslash asterisk to .* (matches string of any length in regexp) '~\?', // convert tilde backslash question to [?] (matches literal question mark in regexp) '\?', // convert backslash question to . (matches one character in regexp) "\x1c", ]

Methods

compare()  : bool
wildcard()  : string

Constants

REPLACEMENT_SET

private mixed REPLACEMENT_SET = ["\x1c", '[*]', '.*', '[?]', '.', '~']

SEARCH_SET

private mixed SEARCH_SET = [ '~~', // convert double tilde to unprintable value '~\*', // convert tilde backslash asterisk to [*] (matches literal asterisk in regexp) '\*', // convert backslash asterisk to .* (matches string of any length in regexp) '~\?', // convert tilde backslash question to [?] (matches literal question mark in regexp) '\?', // convert backslash question to . (matches one character in regexp) "\x1c", ]

Methods

compare()

public static compare(string|null $value, string $wildcard) : bool
Parameters
$value : string|null
$wildcard : string
Return values
bool

wildcard()

public static wildcard(string $wildcard) : string
Parameters
$wildcard : string
Return values
string

        
On this page

Search results