stringbuilder contains c#
StringBuilder stringb = new StringBuilder();
stringb.Append("Snowy Owl.");
stringb.AppendLine();
stringb.Append("Tawny Owl.");
stringb.AppendLine();
stringb.Append("Jamaican Owl.");
stringb.AppendLine();
//this line find substring in stringbuilder.
bool result = stringb.ToString().Contains("Cave Swiftlet");
//this is a technique to find substring in stringbuilder.
bool result2 = stringb.ToString().Contains("Tawny Owl");
Console.WriteLine(stringb.ToString());
Console.WriteLine("stringbuilder contains('Cave Swiftlet'): " + result.ToString());
Console.WriteLine("stringbuilder contains('Tawny Owl'): " + result2.ToString());