I am trying to truncate some long text in C#, but I don\'t want my string to be cut off part way through a word. Does anyone have a function that I can use to truncate my st
I use this
public string Truncate(string content, int length) { try { return content.Substring(0,content.IndexOf(" ",length)) + "..."; } catch { return content; } }