Profile
Achievement
stewartrae's Recent SnippetsTagged c#
- All /
« Prev 1 Next »
C#
TruncateOnWordBoundary - a useful extension method for cutting a string short, but not in the middle of a word.
Ever wanted a method that can truncate a string, but only on a word boundary? This method works like Substring() but doesn't snip a string in the middle of a word, i.e. it only truncates the string on a word boundary. Useful for producing a summary f...
1
1342
posted 13 years ago by stewartrae