UNPKG

@confluentinc/schemaregistry

Version:
24 lines (23 loc) 975 B
/** * Matches fully-qualified names that use dot (.) as the name boundary. * * <p>A '?' matches a single character. * A '*' matches one or more characters within a name boundary. * A '**' matches one or more characters across name boundaries. * * <p>Examples: * <pre> * wildcardMatch("eve", "eve*") --&gt; true * wildcardMatch("alice.bob.eve", "a*.bob.eve") --&gt; true * wildcardMatch("alice.bob.eve", "a*.bob.e*") --&gt; true * wildcardMatch("alice.bob.eve", "a*") --&gt; false * wildcardMatch("alice.bob.eve", "a**") --&gt; true * wildcardMatch("alice.bob.eve", "alice.bob*") --&gt; false * wildcardMatch("alice.bob.eve", "alice.bob**") --&gt; true * </pre> * * @param str - the string to match on * @param wildcardMatcher - the wildcard string to match against * @returns true if the string matches the wildcard string */ export declare function match(str: string, wildcardMatcher: string): boolean;