using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace dasBlog.Storage.SqlServer{ static class StringTools { public static string Truncate(this string s, int length) { if (!string.IsNullOrEmpty(s) && s.Length > length) { s = s.Substring(0, length-1); } return s; } } }