I working on Natural Language Processing, I am trying to remove last part of string, but it remove string from inside a string, my code.
public string RemoveSuffix(string word)
{
if (word.EndsWith("ی")
{
word = word.Replace("ی","");
}
return word;
}