LibreOffice Module tools (master) 1
Public Member Functions | Static Private Member Functions | Private Attributes | List of all members
WildCard Class Reference

#include <wldcrd.hxx>

Public Member Functions

 WildCard ()
 
 WildCard (std::u16string_view rWildCard, const char cSeparator='\0')
 
const OUString & getGlob () const
 
void setGlob (std::u16string_view rString)
 
bool Matches (std::u16string_view rStr) const
 

Static Private Member Functions

static bool ImpMatch (std::u16string_view aWild, std::u16string_view aStr)
 Tests, whether a wildcard in pWild will match for pStr. More...
 

Private Attributes

OUString aWildString
 
char cSepSymbol
 

Detailed Description

Definition at line 29 of file wldcrd.hxx.

Constructor & Destructor Documentation

◆ WildCard() [1/2]

WildCard::WildCard ( )
inline

Definition at line 38 of file wldcrd.hxx.

◆ WildCard() [2/2]

WildCard::WildCard ( std::u16string_view  rWildCard,
const char  cSeparator = '\0' 
)
inline

Definition at line 44 of file wldcrd.hxx.

Member Function Documentation

◆ getGlob()

const OUString & WildCard::getGlob ( ) const
inline

Definition at line 50 of file wldcrd.hxx.

◆ ImpMatch()

bool WildCard::ImpMatch ( std::u16string_view  aWild,
std::u16string_view  aStr 
)
staticprivate

Tests, whether a wildcard in pWild will match for pStr.

'*' in pWild means n chars for n > 0. '?' in pWild mean match exactly one character.

Definition at line 28 of file wldcrd.cxx.

References aStr.

Referenced by Matches().

◆ Matches()

bool WildCard::Matches ( std::u16string_view  rStr) const

Definition at line 100 of file wldcrd.cxx.

References aWildString, cSepSymbol, and ImpMatch().

◆ setGlob()

void WildCard::setGlob ( std::u16string_view  rString)
inline

Definition at line 55 of file wldcrd.hxx.

Member Data Documentation

◆ aWildString

OUString WildCard::aWildString
private

Definition at line 32 of file wldcrd.hxx.

Referenced by Matches().

◆ cSepSymbol

char WildCard::cSepSymbol
private

Definition at line 33 of file wldcrd.hxx.

Referenced by Matches().


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