Пример #1
0
        /// <summary>
        /// Return all matches of the pattern in specified text using the Boyer-Moore algorithm
        /// </summary>
        /// <param name="text">text to be searched</param>
        /// <param name="pattern">pattern to match</param>
        /// <param name="startIndex">Index at which search begins</param>
        /// <returns>IEnumerable which returns the indexes of pattern matches</returns>
        public static IEnumerable <int> BoyerMooreMatch(this String text, String pattern, int startIndex)
        {
            var boyerMoor = new BoyerMoore(pattern);

            return(boyerMoor.BoyerMooreMatch(text, startIndex));
        }