private static string SafeTruncate(string src, int maxLength)
{
// TODO: I think this should actually NOT be safe and should throw an error
// if maxLength is exceeded.
if ((src == null) || (maxLength <= 0)) return "";
if (maxLength >= src.Length) return src;
return src.Substring(0, maxLength);
}