Have to add magic number to length in .Substring
I have a data structure that I read over UDP, and it looks like this:
Get first N number of characters from a string but ignore the last word if cut off in C#
I need to get a “teaser” string from a longer string, getting the first N characters is easy, but I need to make sure the last word is a complete word. If the word is cut off I need to not include it in the substring.