Fan.Sys.Regex.matches C# (CSharp) Method

matches() public method

public matches ( string s ) : bool
s string
return bool
        public bool matches(string s)
        {
            return new RegexMatcher(m_pattern.Match(s), s).matches();
        }

Usage Example

Example #1
0
        public override List list(Regex pattern)
        {
            int len = 0;

            FileSystemInfo[] list = null;
            if (m_file is DirectoryInfo)
            {
                list = (m_file as DirectoryInfo).GetFileSystemInfos();
                len  = list.Length;
            }
            List acc = new List(Sys.FileType, len);

            for (int i = 0; i < len; i++)
            {
                FileSystemInfo f = list[i];
                if (pattern != null && !pattern.matches(f.Name))
                {
                    continue;
                }
                string name = fileNameToUriName(f.Name);
                acc.add(new LocalFile(m_uri.plusName(name, f is DirectoryInfo), f));
            }
            return(acc);
        }
All Usage Examples Of Fan.Sys.Regex::matches