예제 #1
0
        /// <summary>
        /// Return all matched of the pattern in the specified text using the .NET String.indexOf API
        /// </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> BCLMatch(this String text, String pattern, int startIndex)
        {
            var boyerMoor = new BoyerMoore(pattern);

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