Helpful String Extensions
Sitefinity offers some help string extensions. The best being TruncateString() allowing you to format those short summary sections on your pages.
Something that I have found helpful over the last year is some included extensions that Sitefinity provides. You can find them in the Telerik.Sitefinity.dll under System. There is a range of helpful string functions such as Capitalise the first letter and format words into Camel or Pascal case.
The most useful extension of the group has to be TrunacteString(). It allows you to specify the max length of your string as well as have it formatted to a few options.
- Finish Word
- Allow Last Word To Go Over Max Length
- Include Ellipsis
I hope it helps you out.
Thanks for reading and feel free to comment - Darrin Robertson