public static string CutIfLonger(this string source, int maxLength = 1000) { if (String.IsNullOrEmpty(source)) return source; if (source.Length < maxLength) return source; return source.Remove(maxLength - 1); } }