26 #if defined (HAVE_CONFIG_H)
47 glob_match::opts_to_fnmatch_flags (
unsigned int xopts)
const
67 #if defined (OCTAVE_USE_WINDOWS_API)
70 m_glob = std::unique_ptr<glob_match> {
new glob_match {pattern}};
78 #if defined (OCTAVE_USE_WINDOWS_API)
81 m_glob = std::unique_ptr<glob_match> {
new glob_match {m_pat}};
88 #if defined (OCTAVE_USE_WINDOWS_API)
102 while (sym_idx < sym_len)
104 if (pat_idx < pat_len
105 && (m_pat[pat_idx] ==
'?' || m_pat[pat_idx] == sym[sym_idx]))
111 else if (pat_idx < pat_len && m_pat[pat_idx] ==
'*')
114 pat_wildc_idx = pat_idx;
115 sym_wildc_idx = sym_idx;
118 else if (pat_wildc_idx != -1)
122 pat_idx = pat_wildc_idx + 1;
125 sym_idx = sym_wildc_idx;
133 while (pat_idx < pat_len && m_pat[pat_idx] ==
'*')
137 return pat_idx == pat_len;
141 return m_glob->match (sym);
string_vector glob() const
bool match(const std::string &str) const
symbol_match(const std::string &pattern)
bool match(const std::string &sym)
int octave_fnm_period_wrapper(void)
int octave_fnm_pathname_wrapper(void)
int octave_fnm_noescape_wrapper(void)
bool fnmatch(const string_vector &pat, const std::string &str, int fnm_flags)
string_vector glob(const string_vector &pat)