What is the best rewrite of this method to speed it up?
public static bool EndsWith(string line, string term)
{
bool rb = false;
int lengthOfTerm = term.Length;
string endOfString = StringHelpers.RightString(line, lengthOfTerm);
if (StringHelpers.AreEqual(term, endOfString))
{
return true;
}
else
{
rb = false;
}
if (line == term)
{
rb = true;
}
return rb;
}