Unravel Engine C++ Reference
Loading...
Searching...
No Matches
fs::wildcard_pattern Class Reference

A wildcard pattern matcher that supports * (match any sequence) and ? (match single character) More...

#include <pattern_filter.h>

Public Member Functions

 wildcard_pattern (const std::string &pattern)
 Constructs a wildcard pattern from a string.
 
auto matches (const std::string &str) const -> bool
 Tests if the given string matches this pattern.
 
auto get_pattern () const -> const std::string &
 Gets the original pattern string.
 

Detailed Description

A wildcard pattern matcher that supports * (match any sequence) and ? (match single character)

Definition at line 14 of file pattern_filter.h.

Constructor & Destructor Documentation

◆ wildcard_pattern()

fs::wildcard_pattern::wildcard_pattern ( const std::string & pattern)
explicit

Constructs a wildcard pattern from a string.

Parameters
patternPattern string with * and ? wildcards

Definition at line 7 of file pattern_filter.cpp.

Member Function Documentation

◆ get_pattern()

auto fs::wildcard_pattern::get_pattern ( ) const -> const std::string&
inline

Gets the original pattern string.

Definition at line 33 of file pattern_filter.h.

◆ matches()

auto fs::wildcard_pattern::matches ( const std::string & str) const -> bool

Tests if the given string matches this pattern.

Parameters
strString to test against the pattern
Returns
True if the string matches the pattern

Definition at line 12 of file pattern_filter.cpp.


The documentation for this class was generated from the following files: