using System;
using System.Text;
public static class ClipboardFusionHelper
{
public static string ProcessText(string text)
{
//make sure all of the line breaks are the same
//replace CRLF with LF
text = text.Replace(Environment.NewLine, "\n");
//replace CR with LF
text = text.Replace("\r", "\n");
//create a variable to store the edited text
StringBuilder builder = new StringBuilder();
//split the text up by the LF character ('\n') and loop through it
foreach(string line in text.Split(new char[]{'\n'}, StringSplitOptions.RemoveEmptyEntries))
{
//if the line doesn't have the string "google" in it, ignore the line
if(line.IndexOf("google", StringComparison.OrdinalIgnoreCase) == -1)
continue;
//add the line to the variable
builder.AppendLine(line);
}
//return all of the lines that contain "google"
return builder.ToString();
}
}