@confluentinc/schemaregistry
Version:
Node.js client for Confluent Schema Registry
24 lines (23 loc) • 975 B
TypeScript
/**
* 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*") --> true
* wildcardMatch("alice.bob.eve", "a*.bob.eve") --> true
* wildcardMatch("alice.bob.eve", "a*.bob.e*") --> true
* wildcardMatch("alice.bob.eve", "a*") --> false
* wildcardMatch("alice.bob.eve", "a**") --> true
* wildcardMatch("alice.bob.eve", "alice.bob*") --> false
* wildcardMatch("alice.bob.eve", "alice.bob**") --> 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;