While playing around with the Reflector today, I chanced about the StringUtil class inside the Kernel. If you are working with a lot of links in Sitecore, you would have encountered the function EnsurePrefix, that takes in a char and a string as arguments; this is one of the members of this class. Aside from this uber useful utility here are a list of what you can also pick up and use inside this sealed class. Function/Method Parameters Description ArrayToString Array, char Makes strings out of Arrays Capitalize string Uppercases the first letter of a string and lowercases the remaining letters. Clip string, int, bool Clips a string at a certain length. The bool argument is for the ellipsis Combine object, object, string Combines the ToString() representation of the two objects separated by a string divider Concat object[] Accepts a collection of objects and concats the ToString() representation of each value Contains str...
A Sitecore Developer from the Philippines' Blog