1
#pragma once
2
#include <string>
3

            
4
#include "absl/strings/string_view.h"
5

            
6
namespace Envoy {
7
namespace Extensions {
8
namespace Tracers {
9
namespace XRay {
10

            
11
/**
12
 * Performs a case-insensitive wild-card match against the input string.
13
 * This method works with pseudo-regex chars; specifically ? and *
14
 *
15
 * An asterisk (*) represents any combination of characters.
16
 * A question mark (?) represents any single character.
17
 *
18
 * @param pattern The regex-like pattern to compare with.
19
 * @param text The string to compare against the pattern.
20
 * @return whether the text matches the pattern.
21
 */
22
bool wildcardMatch(absl::string_view pattern, absl::string_view input);
23

            
24
} // namespace XRay
25
} // namespace Tracers
26
} // namespace Extensions
27
} // namespace Envoy