In many apps, it’s necessary to search for a character or set of characters in a
string. For example, a programmer creating a word processor would want to provide capabilities for searching through documents. The app in Fig. 16.5 demonstrates some of the many versions of
LastIndexOfAny, which search for a specified character or substring in a
string. We perform all searches in this example on the
string letters (initialized with
"abcdefghijklmabcdefghijklm") located in method
Main of class
1 // Fig. 16.5: StringIndexMethods.cs 2 // Using string-searching methods. 3 using System; ...